You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting this, @sharwell.
The metadata for this method is wrong. It attributes the parameter as [out] when it must be [in, out] to support the fact that it must be initialized by the caller first. In fact the docs for this method show it as in, out.
Once the metadata is fixed, CsWin32 will emit this as a ref parameter. It is up to the caller of the CsWin32 generated API to initialize the struct's length field, just as it would in C++.
Actual behavior
PInvoke.GlobalMemoryStatusEx is generated as follows:
Expected behavior
MEMORYSTATUSEX.dwLength
is set prior to invoking the native method.Repro steps
NativeMethods.txt
content:NativeMethods.json
content (if present):Context
LangVersion
(if explicitly set by project): Not setThe text was updated successfully, but these errors were encountered: