Skip to content

ReadOnlySpan<byte> friendly overload for WriteFile #612

@jnm2

Description

@jnm2

(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.

Metadata

Metadata

Assignees

Labels

usabilityTouch-up to improve the user experience for a language projection

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions