Module: wine
Branch: master
Commit: 87155d654f5b74e22d2f947b2a5cda069c2f2458
URL: http://source.winehq.org/git/wine.git/?a=commit;h=87155d654f5b74e22d2f947b2…
Author: Rob Shearman <rob(a)codeweavers.com>
Date: Mon Mar 5 20:45:49 2007 +0000
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 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index 110223a..a20cb94 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -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;