ole32: Fix a few incorrect pointer/integer casts on 64-bit.

This commit is contained in:
Octavian Voicu 2011-08-31 13:52:02 +03:00 committed by Alexandre Julliard
parent f8d0afe435
commit 9b1fc0fd74
3 changed files with 5 additions and 5 deletions

View file

@ -370,7 +370,7 @@ static HRESULT WINAPI PointerMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash)
if (pdwHash==NULL)
return E_POINTER;
*pdwHash = (DWORD)This->pObject;
*pdwHash = PtrToUlong(This->pObject);
return S_OK;
}

View file

@ -1780,9 +1780,9 @@ static void test_pointer_moniker(void)
/* Hashing */
hr = IMoniker_Hash(moniker, &hash);
ok_ole_success(hr, IMoniker_Hash);
ok(hash == (DWORD)&Test_ClassFactory,
ok(hash == PtrToUlong(&Test_ClassFactory),
"Hash value should have been 0x%08x, instead of 0x%08x\n",
(DWORD)&Test_ClassFactory, hash);
PtrToUlong(&Test_ClassFactory), hash);
/* IsSystemMoniker test */
hr = IMoniker_IsSystemMoniker(moniker, &moniker_type);

View file

@ -429,7 +429,7 @@ unsigned char * __RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBu
{
*(ULONG *)pBuffer = WDT_REMOTE_CALL;
pBuffer += sizeof(ULONG);
*(ULONG *)pBuffer = (ULONG)*phGlobal;
*(ULONG *)pBuffer = HandleToULong(*phGlobal);
pBuffer += sizeof(ULONG);
if (*phGlobal)
{
@ -437,7 +437,7 @@ unsigned char * __RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBu
SIZE_T size = GlobalSize(*phGlobal);
*(ULONG *)pBuffer = (ULONG)size;
pBuffer += sizeof(ULONG);
*(ULONG *)pBuffer = (ULONG)*phGlobal;
*(ULONG *)pBuffer = HandleToULong(*phGlobal);
pBuffer += sizeof(ULONG);
*(ULONG *)pBuffer = (ULONG)size;
pBuffer += sizeof(ULONG);