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

OleAut32.ICreateTypeInfo.AddRefTypeInfo uses wrong parameter direction for phRefType #262

Closed
spkl opened this issue Dec 23, 2021 · 0 comments

Comments

@spkl
Copy link

spkl commented Dec 23, 2021

Describe the bug
ICreateTypeInfo.AddRefTypeInfo is used to obtain an href value to be used later in the AddImplType method.
The remarks start with the following sentence:

The second parameter returns a pointer to the handle of the added type information.

The method is currently declared as following:
HRESULT AddRefTypeInfo([In] ITypeInfo pTInfo, in uint phRefType);
With this declaration, it is impossible to obtain a value. phRefType should really be declared as an out parameter.

What code is involved
PInvoke/Ole/OleAut32/OAIdl.Interfaces.cs

Expected behavior
Define phRefType as out, so that a value can be obtained. Looking into OAIdl.h, you can see that the parameter is originally a pointer.

Thank you and best regards,
Sebastian

@dahall dahall closed this as completed in 52af822 Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant