2009/2/22 Austin English <austinengl...@gmail.com>: > diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c > index b8ddba8..7360f66 100644 > --- a/dlls/ole32/compobj.c > +++ b/dlls/ole32/compobj.c > @@ -2007,7 +2007,7 @@ HRESULT WINAPI CoRegisterClassObject( > * Use the address of the chain node as the cookie since we are sure it's > * unique. FIXME: not on 64-bit platforms. > */ > - newClass->dwCookie = (DWORD)newClass; > + newClass->dwCookie = (DWORD_PTR)newClass; > > /* > * Since we're making a copy of the object pointer, we have to increase its
Since dwCookie is of type DWORD this is just hiding the problem. The correct solution is to store a process-wide index and then to increase this every time a class object is registered and use it for the cookie. CoRevokeClassObject already looks through the list of registered classes to find the cookie so this doesn't need to be changed. -- Rob Shearman