You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
String constants are Type::String, which gets resolved to HSTRING, and while it's unlikely, if you don't bind another item that pulls in PCSTR or PCWSTR (the string types that Type::String constants actually get resolved to) then there will be a missing typedef.
String constants unconditionally assume that the s! and w! macros are available.
Toolchain version/configuration
No response
Reproducible example
No response
Crate manifest
No response
Expected behavior
The emitted string constants should compile correctly.
Actual behavior
The emitted constants will fail to compile due to the unknown s! or w! macro(s), and possibly due to missing the type aliases for PCSTR and/or PCWSTR.
Additional comments
No response
The text was updated successfully, but these errors were encountered:
Much has changed in windows-bindgen since this issue was opened so I'm not sure whether its still relevant. A major update was recently published that you can read about here: #3359
Take it for a spin and let me know if you have any feedback.
Which crate is this about?
windows-bindgen
Crate version
0.49.0
Summary
When binding string constants there are 2 issues.
Type::String
, which gets resolved toHSTRING
, and while it's unlikely, if you don't bind another item that pulls inPCSTR
orPCWSTR
(the string types thatType::String
constants actually get resolved to) then there will be a missing typedef.s!
andw!
macros are available.Toolchain version/configuration
No response
Reproducible example
No response
Crate manifest
No response
Expected behavior
The emitted string constants should compile correctly.
Actual behavior
The emitted constants will fail to compile due to the unknown
s!
orw!
macro(s), and possibly due to missing the type aliases forPCSTR
and/orPCWSTR
.Additional comments
No response
The text was updated successfully, but these errors were encountered: