Commit 87155d65 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Compare the class contexts in COM_GetRegisteredClassObject.

Only objects that have been registered for a class context that matches the requested class context should be returned.
parent 356fdcbb
......@@ -1461,16 +1461,12 @@ static HRESULT COM_GetRegisteredClassObject(
while (curClass != 0)
{
/*
* Check if we have a match on the class ID.
* Check if we have a match on the class ID and context.
*/
if (IsEqualGUID(&(curClass->classIdentifier), rclsid))
if ((dwClsContext & curClass->runContext) &&
IsEqualGUID(&(curClass->classIdentifier), rclsid))
{
/*
* Since we don't do out-of process or DCOM just right away, let's ignore the
* class context.
*/
/*
* We have a match, return the pointer to the class object.
*/
*ppUnk = curClass->classObject;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment