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.
This commit is contained in:
Rob Shearman 2007-03-05 20:45:49 +00:00 committed by Alexandre Julliard
parent 356fdcbb15
commit 87155d654f
1 changed files with 3 additions and 7 deletions

View File

@ -1461,15 +1461,11 @@ 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.
*/