- 
                Notifications
    You must be signed in to change notification settings 
- Fork 114
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Actual behavior
I've updated to the latest version (0.3.162) and my project is now failing to compile. Upon inspecting the generated code, it seems CsWin32 is generating a bunch of invalid code in the QueryInterface methods it's emitting. It's also not clear why these methods are generated in the first place, given I've disabled the friendly overloads. I expect (and want) literally only the vtable methods to be generated, nothing else.
You can see this generated call has invalid arguments. Also, this whole method shouldn't be generated at all, really.
Expected behavior
The code should be valid and compile, and no additional "helper methods" should be generated.
Repro steps
- NativeMethods.txtcontent:
ID3D11ShaderReflection
IUnknown
- NativeMethods.jsoncontent (if present):
{
  "$schema": "https://aka.ms/CsWin32.schema.json",
  "allowMarshaling": false,
  "useSafeHandles": false,
  "comInterop": {
    "preserveSigMethods": [
      "*"
    ]
  },
  "friendlyOverloads": {
    "enabled": false
  }
}Context
- CsWin32 version: 0.3.162
- Win32Metadata version (if explicitly set by project): n/a
- Target Framework: netstandard2.0andnet9.0(I can repro on both)
- LangVersion(if explicitly set by project): n/a
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
