microsoft / CsWin32

A source generator to add a user-defined set of Win32 P/Invoke methods and supporting types to a C# project.
MIT License
2k stars 84 forks source link

Consider having IVTable follow visibility configuration #1033

Open JeremyKuhne opened 10 months ago

JeremyKuhne commented 10 months ago

IVTable is currently hardcoded to internal. This makes it impossible to utilize by other assemblies when one has configured CsWin32 for public visibility. The fallout of this is that it is impossible to leverage the auto-generation of ComWrappers CCWs in an external project (as done with the IManagedWrapper pattern that WinForms uses).

The requested fix is just to follow whatever the visibility configuration is.

Note that this comes up in my personal project, not WinForms, as WinForms does not publicly expose the generated CsWin32 interop.