Module: wine Branch: master Commit: 44a9bae9f8f97180f26501dcc6d59e9f73f63fa5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=44a9bae9f8f97180f26501dcc6...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Dec 9 12:04:01 2009 +0100
ole32: Fix some pointer cast warnings on 64-bit.
---
dlls/ole32/compobj.c | 8 +++----- dlls/ole32/rpc.c | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 58e8f0d..583a9cb 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -2062,6 +2062,7 @@ HRESULT WINAPI CoRegisterClassObject( DWORD flags, LPDWORD lpdwRegister) { + static LONG next_cookie; RegisteredClass* newClass; LPUNKNOWN foundObject; HRESULT hr; @@ -2115,11 +2116,8 @@ HRESULT WINAPI CoRegisterClassObject( newClass->pMarshaledData = NULL; newClass->RpcRegistration = NULL;
- /* - * 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; + if (!(newClass->dwCookie = InterlockedIncrement( &next_cookie ))) + newClass->dwCookie = InterlockedIncrement( &next_cookie );
/* * Since we're making a copy of the object pointer, we have to increase its diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 9a34465..0daa4ab 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -1358,7 +1358,7 @@ void RPC_ExecuteCall(struct dispatch_params *params)
handlecall = IMessageFilter_HandleInComingCall(COM_CurrentApt()->filter, calltype, - (HTASK)GetCurrentProcessId(), + UlongToHandle(GetCurrentProcessId()), 0 /* FIXME */, &interface_info); TRACE("IMessageFilter_HandleInComingCall returned %d\n", handlecall);