From 87155d654f5b74e22d2f947b2a5cda069c2f2458 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Mon, 5 Mar 2007 20:45:49 +0000 Subject: [PATCH] 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. --- dlls/ole32/compobj.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 110223a704d..a20cb946d92 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -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. */