Closed Nuklon closed 7 months ago
This for example: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3dkmthk/ns-d3dkmthk-_d3dkmt_adaptertype
is generated as:
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.18-beta+dc807e7787")] internal partial struct D3DKMT_ADAPTERTYPE { internal _Anonymous_e__Union Anonymous; [StructLayout(LayoutKind.Explicit)] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.18-beta+dc807e7787")] internal partial struct _Anonymous_e__Union { [FieldOffset(0)] internal _Anonymous_e__Struct Anonymous; [FieldOffset(0)] internal uint Value; [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.18-beta+dc807e7787")] internal partial struct _Anonymous_e__Struct { internal uint _bitfield; } } }
Generate helpers around Value for RenderSupported, DisplaySupported, etc.
NativeMethods.txt
D3DKMT_ADAPTERTYPE
LangVersion
It looks like @mikebattista recently did work in https://github.com/microsoft/win32metadata/pull/1620 to improve this. CsWin32 probably just has to leverage it.
Reactivating because there is lots to fix.
Actual behavior
This for example: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3dkmthk/ns-d3dkmthk-_d3dkmt_adaptertype
is generated as:
Expected behavior
Generate helpers around Value for RenderSupported, DisplaySupported, etc.
Repro steps
NativeMethods.txt
content:Context
LangVersion
(if explicitly set by project): latest