This PR bumps windows-rs to the latest 0.51 version.
There are some new patterns to deal with optional out params that windows isn't handling in a very elegant way, e.g. options of options of mutable pointers where the difference between None and Some(null_mut()) is not particularly evident, so some helper functions to deal with these cases should be added and applied:
out_param for pre-allocated out parameters
try_out_param for pre-allocated out parameters in a fallible function
out_ptr for out pointers allocated by the function itself
try_out_ptr for out pointers allocated by a fallible function
Example of usage:
let desc = try_out_param(|&mut out| device_and_swap_chain.GetDesc(out))?;
This PR bumps
windows-rs
to the latest 0.51 version.There are some new patterns to deal with optional out params that
windows
isn't handling in a very elegant way, e.g. options of options of mutable pointers where the difference betweenNone
andSome(null_mut())
is not particularly evident, so some helper functions to deal with these cases should be added and applied:out_param
for pre-allocated out parameterstry_out_param
for pre-allocated out parameters in a fallible functionout_ptr
for out pointers allocated by the function itselftry_out_ptr
for out pointers allocated by a fallible functionExample of usage:
Blocked by #126