Closed alexrp closed 1 year ago
Thank you for the report. I see in the metadata that this API is declared as:
public unsafe static extern BOOL WriteFile([In] HANDLE hFile, [Optional][In][Const][MemorySize(BytesParamIndex = 2)] byte* lpBuffer, [In] uint nNumberOfBytesToWrite, [Optional][Out] uint* lpNumberOfBytesWritten, [Optional][In][Out] OVERLAPPED* lpOverlapped);
My guess is because lpBuffer
isn't using the NativeArrayInfoAttribute
that we decide it isn't an array. I'm not sure if the metadata should be using one or the other, but CsWin32 can be updated to recognize MemorySize
as well.
Actual behavior
Expected behavior
This overload used to take a
byte*
.byte?
is definitely not right.Repro steps
NativeMethods.txt
content:NativeMethods.json
content (if present):Context
LangVersion
(if explicitly set by project): latest