Actual behavior
This might be one for win32metadata, but reporting here in case it isn't. Most Msi* currently return a uint, however the return value is typically a WIN32_ERROR value. Using MsiExtractPatchXMLData() as an example, you can see it states several WIN32_ERROR values it may return.
Comparing this with something like SetNamedSecurityInfo(), this returns a DWORD (ultimately a uint), however CsWin32 returns this correctly as a WIN32_ERROR value for the caller's convenience.
Expected behavior
That if a method is returning a WIN32_ERROR value, it should be cast as that without the caller having to work it out for themselves.
Repro steps
NativeMethods.txt content:
-
NativeMethods.json content (if present): N/A
-
Any of your own code that should be shared? N/A
Context
- CsWin32 version: 0.3.0264
- Win32Metadata version (if explicitly set by project): N/A
- Target Framework: net472
LangVersion (if explicitly set by project): N/A
Actual behavior
This might be one for win32metadata, but reporting here in case it isn't. Most Msi* currently return a uint, however the return value is typically a WIN32_ERROR value. Using
MsiExtractPatchXMLData()as an example, you can see it states several WIN32_ERROR values it may return.Comparing this with something like
SetNamedSecurityInfo(), this returns a DWORD (ultimately a uint), however CsWin32 returns this correctly as a WIN32_ERROR value for the caller's convenience.Expected behavior
That if a method is returning a WIN32_ERROR value, it should be cast as that without the caller having to work it out for themselves.
Repro steps
NativeMethods.txtcontent:NativeMethods.jsoncontent (if present): N/AAny of your own code that should be shared? N/A
Context
LangVersion(if explicitly set by project): N/A