Skip to content

Add first-class types for PCSTR and PCWSTR#1550

Merged
kennykerr merged 10 commits intomasterfrom
to_const
Feb 18, 2022
Merged

Add first-class types for PCSTR and PCWSTR#1550
kennykerr merged 10 commits intomasterfrom
to_const

Conversation

@kennykerr
Copy link
Copy Markdown
Collaborator

They're finally here! While the Win32 metadata lacks explicit types for PCSTR and PCWSTR, the metadata gives enough clues as to when they would have existed in the original APIs and my metadata crate now reconstructs that type information. As a result, the windows and windows-sys crates can now offer first-class PCSTR and PCWSTR types, alongside PSTR and PWSTR, thus making const-correct Win32 programming far more natural in Rust.

As these types are synthesized and highly specialized, I've moved them into the windows::core and windows_sys::core modules respectively.

Fixes #1496, fixes #1504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

windows-sys doesn't distinguish between LPCWSTR and LPWSTR GetClassNameW function argument mutability

1 participant