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

ComWrappers do not respect interface IID when used for marshalling #35883

Closed
jkotas opened this issue May 6, 2020 · 2 comments · Fixed by #36054
Closed

ComWrappers do not respect interface IID when used for marshalling #35883

jkotas opened this issue May 6, 2020 · 2 comments · Fixed by #36054

Comments

@jkotas
Copy link
Member

jkotas commented May 6, 2020

See dotnet/corert#4219 (comment) for details

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label May 6, 2020
@jkotas jkotas added this to the 5.0 milestone May 6, 2020
@jkotas jkotas added the bug label May 6, 2020
@AaronRobinsonMSFT AaronRobinsonMSFT removed the untriaged New issue has not been triaged by the area owner label May 6, 2020
@AaronRobinsonMSFT
Copy link
Member

As mentioned in the above bug there is an issue at:

if (TryGetComIPFromObjectRefUsingComWrappers(*poref, &pUnk))
{
SafeComHolder<IUnknown> pvObj;
hr = pUnk->QueryInterface(iid, &pvObj);
if (FAILED(hr))
COMPlusThrowHR(hr);
RETURN pUnk;
}

There is also another instance of the same issue lurking higher in the file:

if (TryGetComIPFromObjectRefUsingComWrappers(*poref, &pUnk))
{
hr = S_OK;
SafeComHolder<IUnknown> pvObj;
if (ReqIpType & ComIpType_Dispatch)
{
hr = pUnk->QueryInterface(IID_IDispatch, &pvObj);
}
else if (ReqIpType & ComIpType_Inspectable)
{
SafeComHolder<IInspectable> pvObj;
hr = pUnk->QueryInterface(IID_IInspectable, &pvObj);
}
if (FAILED(hr))
COMPlusThrowHR(hr);
if (pFetchedIpType != NULL)
*pFetchedIpType = ReqIpType;
RETURN pUnk;
}

@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants