Actual behavior
CM_Locate_DevNode does not generate Span or string overload for second parameter ([Optional] winmdroot.Foundation.PWSTR pDeviceID).
Expected behavior
Generating overloads like:
internal static extern unsafe winmdroot.Devices.DeviceAndDriverInstallation.CONFIGRET CM_Locate_DevNode(out uint pdnDevInst, [Optional] Span pDeviceID, winmdroot.Devices.DeviceAndDriverInstallation.CM_LOCATE_DEVNODE_FLAGS ulFlags);
or
internal static extern unsafe winmdroot.Devices.DeviceAndDriverInstallation.CONFIGRET CM_Locate_DevNode(out uint pdnDevInst, [Optional] string pDeviceID, winmdroot.Devices.DeviceAndDriverInstallation.CM_LOCATE_DEVNODE_FLAGS ulFlags);
Maybe this is expected behaviour. In that case, what is the best way to handle my task - passing string to this method?
Repro steps
NativeMethods.txt content:
NativeMethods.json content (if present):
- Any of your own code that should be shared?
Context
- CsWin32 version: 0.3.275
- Win32Metadata version (if explicitly set by project):
- Target Framework: net10.0
LangVersion (if explicitly set by project): [e.g. 9]
Actual behavior
CM_Locate_DevNode does not generate Span or string overload for second parameter ([Optional] winmdroot.Foundation.PWSTR pDeviceID).
Expected behavior
Generating overloads like:
internal static extern unsafe winmdroot.Devices.DeviceAndDriverInstallation.CONFIGRET CM_Locate_DevNode(out uint pdnDevInst, [Optional] Span pDeviceID, winmdroot.Devices.DeviceAndDriverInstallation.CM_LOCATE_DEVNODE_FLAGS ulFlags);
or
internal static extern unsafe winmdroot.Devices.DeviceAndDriverInstallation.CONFIGRET CM_Locate_DevNode(out uint pdnDevInst, [Optional] string pDeviceID, winmdroot.Devices.DeviceAndDriverInstallation.CM_LOCATE_DEVNODE_FLAGS ulFlags);
Maybe this is expected behaviour. In that case, what is the best way to handle my task - passing string to this method?
Repro steps
NativeMethods.txtcontent:NativeMethods.jsoncontent (if present):Context
LangVersion(if explicitly set by project): [e.g.9]