-
Notifications
You must be signed in to change notification settings - Fork 84
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
IDispatch interface is not generated #861
Comments
This is by design. COM interfaces must not derive from If marshaling is turned off, the structs generated include the members of IDispatch directly in them (as required), so in that case too, there is no need to generate |
We do have a means to communicate certain banned APIs so that attempts to generate them produce a warning or error. I'll add something for these special interfaces. |
Looking at #862 it appears you only need it for its guid. We can probably solve that another way. Perhaps by emitting an |
I'm working with more recent version of .NET Core, and there's nothing implicit about Also, even with .NET Framework, it's not because it can implement it that we shouldn't be allowed to use it, like in interop scenarios talking to an unmanaged object itself implementing Can you alllow CsWin32 to generate it? Or at maybe add a possiblity to tweak this in NativeMethods.json? |
@smourier: In .NET Framework, one either works with COM objects in a marshaled or unmarshaled scenario. When working with marshaling, |
I must be missing something but when I put
|
You can't request it. It isn't generated directly. In marshaled mode it's an attribute. In non-marshaled mode, its members are included in the structs that act as your RCW/CCW. |
I just need the |
Actual behavior
Generation of this interface seems to be skipped.
Expected behavior
Something like this:
Repro steps
NativeMethods.txt
content:NativeMethods.json
content (if present):Context
LangVersion
(if explicitly set by project): 11The text was updated successfully, but these errors were encountered: