Skip to content
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 missing _COM_Outptr_ SAL to DxcCreateInstance and friends #4524

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MarijnS95
Copy link
Contributor

Ever since windows-rs started requiring SAL for properly processing functions that return a COM instance these annotations had to be added. They seem to be present on most functions and were worked around for DxcCreateInstance(2) in win32metadata (yet their *Proc typedef variants were omitted).

This includes more random functions that were spotted (particularly the _Out_ IDxc* pattern) but I have been unable to check the nullability for every variant. As per the documentation these _COM_Outptr_ annotations already include the notion of leaving/setting this output pointer to NULL in an error case, in which case a non-S_OK HRESULT should also be returned.

MarijnS95 and others added 2 commits June 20, 2022 21:00
Ever since [windows-rs started requiring SAL] for properly processing
functions that return a COM instance these annotations had to be added.
They seem to be present on most functions and were [worked around for
`DxcCreateInstance(2)` in `win32`metadata] (yet their `*Proc` `typedef`
variants were omitted).

[windows-rs started requiring SAL]: microsoft/windows-rs#1088 (comment)
[worked around for `DxcCreateInstance(2)` in `win32`metadata]: https://github.com/microsoft/win32metadata/pull/890/files
@AppVeyorBot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
Development

Successfully merging this pull request may close these issues.

2 participants