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

OleCreateFontIndirect has incorrect [in]/[out] parameters #1089

Closed
elachlan opened this issue Aug 21, 2022 · 2 comments · Fixed by #1245
Closed

OleCreateFontIndirect has incorrect [in]/[out] parameters #1089

elachlan opened this issue Aug 21, 2022 · 2 comments · Fixed by #1245
Assignees
Labels

Comments

@elachlan
Copy link
Contributor

elachlan commented Aug 21, 2022

https://docs.microsoft.com/en-us/windows/win32/api/olectl/nf-olectl-olecreatefontindirect

[DllImport("OLEAUT32", ExactSpelling = true, PreserveSig = false)]
[SupportedOSPlatform("windows5.0")]
public unsafe static extern HRESULT OleCreateFontIndirect([In][Out] FONTDESC* lpFontDesc, [In][Const] Guid* riid, [In][Out] void** lplpvObj);

Should be:

[DllImport("OLEAUT32", ExactSpelling = true, PreserveSig = false)]
[SupportedOSPlatform("windows5.0")]
public unsafe static extern HRESULT OleCreateFontIndirect([In] FONTDESC* lpFontDesc, [In][Const] Guid* riid, [Out] void** lplpvObj);

Winforms Tracking: dotnet/winforms#7468
Related: #1059

@sotteson1
Copy link
Contributor

It looks like all of the functions in OleCtl.h need to be updated with proper in/out since none of these have any SAL annotations.

@elachlan
Copy link
Contributor Author

Is that something we do manually? or is the upstream header updated and we pull that in?

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

Successfully merging a pull request may close this issue.

4 participants