ole32: Fix a few incorrect pointer/integer casts on 64-bit.
Octavian Voicu
octavian.voicu at gmail.com
Tue Aug 30 19:17:42 CDT 2011
---
dlls/ole32/pointermoniker.c | 2 +-
dlls/ole32/tests/moniker.c | 4 ++--
dlls/ole32/usrmarshal.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ole32/pointermoniker.c b/dlls/ole32/pointermoniker.c
index d79afd2..b388486 100644
--- a/dlls/ole32/pointermoniker.c
+++ b/dlls/ole32/pointermoniker.c
@@ -370,7 +370,7 @@ static HRESULT WINAPI PointerMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash)
if (pdwHash==NULL)
return E_POINTER;
- *pdwHash = (DWORD)This->pObject;
+ *pdwHash = (DWORD)(DWORD_PTR)This->pObject;
return S_OK;
}
diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c
index 54a5f8c..fd643a1 100644
--- a/dlls/ole32/tests/moniker.c
+++ b/dlls/ole32/tests/moniker.c
@@ -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 == (DWORD)(DWORD_PTR)&Test_ClassFactory,
"Hash value should have been 0x%08x, instead of 0x%08x\n",
- (DWORD)&Test_ClassFactory, hash);
+ (DWORD)(DWORD_PTR)&Test_ClassFactory, hash);
/* IsSystemMoniker test */
hr = IMoniker_IsSystemMoniker(moniker, &moniker_type);
diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c
index 2d238e6..3945bd2 100644
--- a/dlls/ole32/usrmarshal.c
+++ b/dlls/ole32/usrmarshal.c
@@ -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 = (ULONG)(ULONG_PTR)*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 = (ULONG)(ULONG_PTR)*phGlobal;
pBuffer += sizeof(ULONG);
*(ULONG *)pBuffer = (ULONG)size;
pBuffer += sizeof(ULONG);
--
1.7.4.1
More information about the wine-patches
mailing list