Commit 9b1fc0fd authored by Octavian Voicu's avatar Octavian Voicu Committed by Alexandre Julliard

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

parent f8d0afe4
...@@ -370,7 +370,7 @@ static HRESULT WINAPI PointerMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash) ...@@ -370,7 +370,7 @@ static HRESULT WINAPI PointerMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash)
if (pdwHash==NULL) if (pdwHash==NULL)
return E_POINTER; return E_POINTER;
*pdwHash = (DWORD)This->pObject; *pdwHash = PtrToUlong(This->pObject);
return S_OK; return S_OK;
} }
......
...@@ -1780,9 +1780,9 @@ static void test_pointer_moniker(void) ...@@ -1780,9 +1780,9 @@ static void test_pointer_moniker(void)
/* Hashing */ /* Hashing */
hr = IMoniker_Hash(moniker, &hash); hr = IMoniker_Hash(moniker, &hash);
ok_ole_success(hr, IMoniker_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", "Hash value should have been 0x%08x, instead of 0x%08x\n",
(DWORD)&Test_ClassFactory, hash); PtrToUlong(&Test_ClassFactory), hash);
/* IsSystemMoniker test */ /* IsSystemMoniker test */
hr = IMoniker_IsSystemMoniker(moniker, &moniker_type); hr = IMoniker_IsSystemMoniker(moniker, &moniker_type);
......
...@@ -429,7 +429,7 @@ unsigned char * __RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBu ...@@ -429,7 +429,7 @@ unsigned char * __RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBu
{ {
*(ULONG *)pBuffer = WDT_REMOTE_CALL; *(ULONG *)pBuffer = WDT_REMOTE_CALL;
pBuffer += sizeof(ULONG); pBuffer += sizeof(ULONG);
*(ULONG *)pBuffer = (ULONG)*phGlobal; *(ULONG *)pBuffer = HandleToULong(*phGlobal);
pBuffer += sizeof(ULONG); pBuffer += sizeof(ULONG);
if (*phGlobal) if (*phGlobal)
{ {
...@@ -437,7 +437,7 @@ unsigned char * __RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBu ...@@ -437,7 +437,7 @@ unsigned char * __RPC_USER HGLOBAL_UserMarshal(ULONG *pFlags, unsigned char *pBu
SIZE_T size = GlobalSize(*phGlobal); SIZE_T size = GlobalSize(*phGlobal);
*(ULONG *)pBuffer = (ULONG)size; *(ULONG *)pBuffer = (ULONG)size;
pBuffer += sizeof(ULONG); pBuffer += sizeof(ULONG);
*(ULONG *)pBuffer = (ULONG)*phGlobal; *(ULONG *)pBuffer = HandleToULong(*phGlobal);
pBuffer += sizeof(ULONG); pBuffer += sizeof(ULONG);
*(ULONG *)pBuffer = (ULONG)size; *(ULONG *)pBuffer = (ULONG)size;
pBuffer += sizeof(ULONG); pBuffer += sizeof(ULONG);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment