Pointers cannot reference marshaled structures. Use ByRef instead.
Only happens on .NET Framework 472.
If you remove the public global::Windows.Win32.VariableLengthInlineArray<char> HardwareID; field from SP_DRVINFO_DETAIL_DATA_W it works correctly. It worked correctly in CsWin32 0.3.49.
Expected behavior
Work correctly.
Repro steps
NativeMethods.txt content:
SetupDiGetDriverInfoDetail
NativeMethods.json content (if present):
Any of your own code that should be shared?
Context
CsWin32 version: 0.3.106
Win32Metadata version (if explicitly set by project): 61.0.15-preview
Actual behavior
Pointers cannot reference marshaled structures. Use ByRef instead. Only happens on .NET Framework 472. If you remove the
public global::Windows.Win32.VariableLengthInlineArray<char> HardwareID;
field fromSP_DRVINFO_DETAIL_DATA_W
it works correctly. It worked correctly in CsWin32 0.3.49.Expected behavior
Work correctly.
Repro steps
NativeMethods.txt
content:NativeMethods.json
content (if present):Any of your own code that should be shared?
Context