Generate dxdiag.h bindings in DirectX.Diagnostics namespace - #2073
Generate dxdiag.h bindings in DirectX.Diagnostics namespace#2073Marijn Suijten (MarijnS95) wants to merge 1 commit into
dxdiag.h bindings in DirectX.Diagnostics namespace#2073Conversation
| IDxDiagContainer::EnumChildContainerNames::pwszContainer=[Out][NativeArrayInfo(CountFieldName = "cchContainer")] | ||
| IDxDiagContainer::EnumPropNames::pwszPropName=[Out][NativeArrayInfo(CountFieldName = "cchPropName")] |
There was a problem hiding this comment.
Noting to self that this needs to use CountParamIndex so that this special piece of code in windows-rs translates the function argument to &mut [u16] (unfortunately loosing the PWSTR type) to pass the "capacity" of the output string into cch* without users having to do so manually:
Since there are a few more functions with CountFieldName attributes, maybe those should be renamed or windows-rs needs to lookup by name as well?
(Bonus: PWSTR can't be used as function argument because it defines the length based on strlen() that searches for a NUL-terminator, which isn't defined for an arbitrary "output only" buffer. The transparent PWSTR pointer wrapper "newtype" doesn't behave like an "owned" Rust Vec which carries a length and capacity field)
ef3cae8 to
8e6b731
Compare
8e6b731 to
96628f9
Compare
96628f9 to
6ae77ba
Compare
6ae77ba to
605e99b
Compare
605e99b to
f239426
Compare
f239426 to
f33efae
Compare
No description provided.