Update dependency Microsoft.Windows.CsWin32 to 0.3.242 #1501
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.3.228->0.3.242Release Notes
Microsoft/CsWin32 (Microsoft.Windows.CsWin32)
v0.3.242Changes:
This list of changes was auto generated.
v0.3.238Changes:
This list of changes was auto generated.
v0.3.236NOTE: This changes the signature of methods with optional parameters. This change is also documented at https://microsoft.github.io/CsWin32/docs/getting-started.html:
Optional out/ref parameters
Some parameters in win32 are
[optional, out]or[optional, in, out]. C# does not have an idiomatic way to represent this concept, so for any method that has such parameters, CsWin32 will generate two versions: one with allreforoutparameters included, and one with all such parameters omitted. For example:Working with Span-typed and MemorySize-d parameters
In the Win32 APIs there are many functions where one parameter is a buffer (
void*orbyte*) and another parameter is the size of that buffer. When generating for a target framework that supports Spans, there will be overloads of these functions that take aSpan<byte>which represents both of these parameters, since a Span refers to a chunk of memory and a length. For example, an API like IsTextUnicode has avoid*parameter whose length is described by the iSize parameter in the native signature. The CsWin32 projection of this method will be:Instead of passing the buffer and length separately, in this projection you pass just one parameter. Span is a flexible type with many things that can be converted to it safely. You will also see Span parameters for things that may look like a struct but are variable sized. For example, InitializeAcl looks like it returns an ACL struct but the parameter is annotated with a
[MemorySize]attribute in the metadata, indicating it is variable-sized based on another parameter. Thus, the cswin32 projection of this method will project this parameter as aSpan<byte>since the size of the parameter is variable:And you would call this by creating a buffer to receive the ACL. Then, after the call you can reinterpret the buffer as an ACL:
CsWin32 will also generate a struct-typed parameter for convenience but this overload will pass
sizeof(T)for the length parameter to the underlying Win32 API, so this only makes sense in some overloads such as SHGetFileInfo where the parameter has an annotation indicating it's variable-sized, but the size is only eversizeof(SHFILEINFOW):Changes:
v0.3.235What's Changed
Full Changelog: microsoft/CsWin32@v0.3.228...v0.3.235
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.