-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supporting "Win32" APIs not included with Windows SDK #66
Comments
I was able to get the specific example of Win32 WebView2 working with another partition under I was thinking it might work best to mirror the entire Alternatively, there could be a different mode for all of the relevant tooling that lets us put the external partitions somewhere in the existing |
I think I found a C# compiler bug. 😄 |
Thanks for experimenting, Bill! This is related to microsoft/wdkmetadata#1 in the sense that the WDK request may well also necessitatea producing a seperate winmd that depends on Windows.Win32.winmd in much the same way as any other 3rd party components would. |
I think a possible workaround for the compiler bug might be to redeclare |
To do this out of tree (i.e. in a standalone project), I think the The other thing I thought it would need is the namespace information, but it looks like types are still globally unique when the PInvoke/FFI for a projection is generated, so it should be possible to enumerate all the types and build a map of the type names to the namespace used in the metadata. |
The standalone project would probably also resemble the complete pipeline of this project quite a bit, but hopefully as more of a turnkey solution. |
We now have two samples in the code that show how to use the external scarper nuget package. It's up to external projects to use the scraper and publish their own .winmd files. |
@sotteson1 None of them seem to work. Do you have a sample that demonstrates usage outside the source tree? |
I updated win32metadata\sources\msbuild\GeneratorSample\GeneratorSample.proj to use the right version of what's in nuget.org. To build it, I did "dotnet build" from that directory and it worked. Let me know if it doesn't for you. There might be something in your configuration that is needed to build that I don't know about. |
How do we generate a
.winmd
for Win32-style components that don't ship with the Windows SDK and thus won't be included in thewindows.win32.winmd
that this project produces? Here's an example of such an API:https://www.nuget.org/packages/Microsoft.Web.WebView2
Hopefully most such components will provide WinRT APIs, but it sounds like Project Reunion may also eventually provide Win32-style APIs, so we may need a story for this.
Such components would typically also refer to common Win32 types so we'd want them to refer to
windows.win32.winmd
rather than duplicate those definitions.The text was updated successfully, but these errors were encountered: