-
Notifications
You must be signed in to change notification settings - Fork 515
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
Feature request: Consider adding interfaces such as IPropertyStore to the sys crate #2109
Comments
I suppose this is covered in the FAQ and so I guess this decision has been made with a lot of thought. So if this won't be considered, feel free to close this. I just think it would be great if the sys package could be used for all scenarios if someone wanted the lowest level API that matched that of the C++ one. 😄 |
If you report such cases, they tend to be quickly fixed: https://github.com/microsoft/win32metadata/issues |
No worries at all, I'll definitely be reporting all instances of these that I've found over the weekend. Thanks heaps. Is inclusion of COM interfaces in the sys crate something that's open for consideration or is it simply too much overhead to add to the sys crate? Seeing as how the various pieces of functionality are broken up into separate crates; I was hoping that it would be an opt-in thing anyway, but I understand if it simply doesn't make sense technically. Cheers |
I have experimented with a lightweight version of COM interfaces but nothing good enough to warrant adding to the Regarding all those useless COM APIs in the |
Thanks so much @kennykerr, I'll go ahead and close this one and focus my efforts on reporting any issues I find with the main crate so we can get it as close to perfect as possible. Cheers |
Raised the related issue for wincrypt.h here 😄 |
Motivation
I personally have found the sys crate to be more natural to use in practice, and the reduced compile times are fantastic.
I think the included functionality is excellent, although with interfaces such as
IShellDispatch
,IPropertyStore
etc. all simply beingc_void
pointers in the sys crate, it seems impossible to use related functions.Keeping the sys crate minimal is indeed a wonderful idea, but removal of the interface definitions makes it impossible to use for certain scenarios.
A little explanation of why I find the sys crate more usable is as follows:
u32
as a parameter for constant types and thus you have to useCONSTANT.0
to pass the relevant u32). Some examples of this areCertAddEncodedCertificateToStore(.., dwcertencodingtype, ...)
,SetEntriesInAclW -> u32
,GetFileAttributesW -> u32
which we need to perform bitwise operations on withFILE_ATTRIBUTE_*
constants.Drawbacks
The sys crate could grow in size a little when interfaces are added.
Rationale and alternatives
Additional context
No response
The text was updated successfully, but these errors were encountered: