(0.1.506-beta)
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-writefile#parameters has void* lpBuffer, uint nNumberOfBytesToWrite. Since the second parameter explicitly defines the previous parameter in terms of bytes, it seems like the friendly overload could replace both parameters with ReadOnlySpan<byte> buffer.
The benefit would be avoiding adding unsafe + fixed around the call.
(0.1.506-beta)
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-writefile#parameters has
void* lpBuffer, uint nNumberOfBytesToWrite. Since the second parameter explicitly defines the previous parameter in terms of bytes, it seems like the friendly overload could replace both parameters withReadOnlySpan<byte> buffer.The benefit would be avoiding adding unsafe + fixed around the call.