-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add windows-result
crate
#2847
Add windows-result
crate
#2847
Conversation
@ridwanabdillahi I moved some types from |
The respective parts of the .natvis implementation need to move and have their
The |
Sorry for the delay but Tim is correct. Since the crate housing certain types have changed, the Natvis definitions for those types need to be updated to specify the correct fully qualified name of these types. For instance |
Thanks for the quick fix @riverar! |
The .natvis file still needs to be split in two and associated with each crate. The test currently succeeds by coincidence. A test that only references While at it I would also suggest renaming the .natvis file following the crate name (i.e., windows-core.natvis and windows-result.natvis). This makes it a lot easier to spot when multiple .natvis files are compiled into a PDB using the |
Thanks Tim, yes it makes sense to split them up and have per-crate natvis files. I'd also like to greatly simplify the testing as its currently too difficult to figure out what's wrong and how to fix it. Anyway, I'll leave that for another PR. Feel free to jump in to help if you would like. |
This update pulls out the error handling implementation from the
windows-core
crate and making it available directly without a dependency on thewindows
orwindows-core
crates. Windows error handling can be tricky. This should make it simpler for library and component authors to use and provide Windows error handling and propagation in more scenarios. Notably:These types are still included in the
windows-core
andwindows
crates as a dependency so it should not affect existing code too much.This depends on the low-level vtable generation provided by Add "vtbl" option for low-level interface vtable generation #2845 and provides a simple example of how one might go about using that.
The
Error
andHRESULT
types have been simplified a little. Mainly they no longer force you to convert to and fromHSTRING
types. You can use astr
to create a newError
value and you can retrieve the error messages from anHRESULT
orError
value directly as aString
.