https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2a5e2a2ab6d007133fca3…
commit 2a5e2a2ab6d007133fca3ed5f0a1eacda8f15e45
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Mar 4 21:58:15 2018 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Aug 4 19:19:34 2018 +0200
[REACTX] Fix 64 bit issues
---
win32ss/reactx/dxg/ddhmg.c | 10 +++++-----
win32ss/reactx/dxg/ddraw.c | 10 +++++-----
win32ss/reactx/dxg/dxg_int.h | 2 +-
win32ss/reactx/ntddraw/dxeng.c | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/win32ss/reactx/dxg/ddhmg.c b/win32ss/reactx/dxg/ddhmg.c
index 6517ccf246..609592ffbb 100644
--- a/win32ss/reactx/dxg/ddhmg.c
+++ b/win32ss/reactx/dxg/ddhmg.c
@@ -27,7 +27,7 @@ FASTCALL
VerifyObjectOwner(PDD_ENTRY pEntry)
{
DWORD Pid = (DWORD)(DWORD_PTR)PsGetCurrentProcessId() & 0xFFFFFFFC;
- DWORD check = (DWORD)pEntry->Pid & 0xFFFFFFFE;
+ DWORD check = (DWORD_PTR)pEntry->Pid & 0xFFFFFFFE;
return ( (check == Pid) || (!check));
}
@@ -163,7 +163,7 @@ DdHmgLock(HANDLE DdHandle, UCHAR ObjectType, BOOLEAN LockOwned)
if ( VerifyObjectOwner(pEntry) )
{
if ( ( pEntry->Objt == ObjectType ) &&
- ( pEntry->FullUnique == (((ULONG)DdHandle >> 21) & 0x7FF) )
&&
+ ( pEntry->FullUnique == (((ULONG_PTR)DdHandle >> 21) &
0x7FF) ) &&
( !pEntry->pobj->cExclusiveLock ) )
{
InterlockedIncrement((VOID*)&pEntry->pobj->cExclusiveLock);
@@ -261,7 +261,7 @@ DdGetFreeHandle(UCHAR objType)
PVOID mAllocMem = NULL;
ULONG mAllocEntries = 0;
PDD_ENTRY pEntry = NULL;
- ULONG retVal;
+ ULONG_PTR retVal;
ULONG index;
// check if memory is allocated
@@ -362,7 +362,7 @@ DdHmgAlloc(ULONG objSize, CHAR objType, BOOLEAN objLock)
pEntry->pobj = pObject;
pEntry->Objt = objType;
- pEntry->Pid = (HANDLE)(((ULONG)PsGetCurrentProcessId() & 0xFFFFFFFC) |
((ULONG)(pEntry->Pid) & 1));
+ pEntry->Pid = (HANDLE)(((ULONG_PTR)PsGetCurrentProcessId() & 0xFFFFFFFC) |
((ULONG_PTR)(pEntry->Pid) & 1));
if (objLock)
{
@@ -417,7 +417,7 @@ DdHmgFree(HANDLE DdHandle)
pEntry->NextFree = ghFreeDdHmgr;
// reset process ID
- pEntry->Pid = (HANDLE)((DWORD)pEntry->Pid & 1);
+ pEntry->Pid = (HANDLE)((DWORD_PTR)pEntry->Pid & 1);
ghFreeDdHmgr = Index;
EngReleaseSemaphore(ghsemHmgr);
diff --git a/win32ss/reactx/dxg/ddraw.c b/win32ss/reactx/dxg/ddraw.c
index 582a897f5c..1a639a39ef 100644
--- a/win32ss/reactx/dxg/ddraw.c
+++ b/win32ss/reactx/dxg/ddraw.c
@@ -260,7 +260,7 @@ DxDdCreateDirectDrawObject(
{
PDC pDC = NULL;
HDEV hDev = NULL;
- DWORD retVal = 0;
+ DWORD_PTR retVal = 0;
pDC = gpEngFuncs.DxEngLockDC(hDC);
if (!pDC)
@@ -284,7 +284,7 @@ DxDdCreateDirectDrawObject(
// create object only for 8BPP and more
if (gpEngFuncs.DxEngGetHdevData(hDev, DxEGShDevData_DitherFmt) >= BMF_8BPP)
- retVal = (DWORD)intDdCreateDirectDrawLocal(hDev);
+ retVal = (DWORD_PTR)intDdCreateDirectDrawLocal(hDev);
gpEngFuncs.DxEngUnlockHdev(hDev);
gpEngFuncs.DxEngUnlockDC(pDC);
@@ -458,8 +458,8 @@ DxDdQueryDirectDrawObject(
if (pCallBackFlags)
{
*(DWORD*)pCallBackFlags = peDdGl->ddCallbacks.dwFlags;
- *(DWORD*)((ULONG)pCallBackFlags + 4) =
peDdGl->ddSurfaceCallbacks.dwFlags;
- *(DWORD*)((ULONG)pCallBackFlags + 8) =
peDdGl->ddPaletteCallbacks.dwFlags;
+ *(DWORD*)((ULONG_PTR)pCallBackFlags + 4) =
peDdGl->ddSurfaceCallbacks.dwFlags;
+ *(DWORD*)((ULONG_PTR)pCallBackFlags + 8) =
peDdGl->ddPaletteCallbacks.dwFlags;
}
if (pd3dNtHalCallbacks)
@@ -636,7 +636,7 @@ intDdCreateNewSurfaceObject(PEDD_DIRECTDRAW_LOCAL peDdL, HANDLE
hDirectDrawLocal
pSurface->hSecure = (VOID*)1;
peDdL->peSurface_DdList = pSurface;
- peDdL->hSurface = (ULONG)pSurface->pobj.hHmgr;
+ peDdL->hSurface = (ULONG_PTR)pSurface->pobj.hHmgr;
}
return pSurface;
diff --git a/win32ss/reactx/dxg/dxg_int.h b/win32ss/reactx/dxg/dxg_int.h
index dec133499f..fa9c3170a8 100644
--- a/win32ss/reactx/dxg/dxg_int.h
+++ b/win32ss/reactx/dxg/dxg_int.h
@@ -11,7 +11,7 @@
#define NT_BUILD_ENVIRONMENT
#define DDHMG_HANDLE_LIMIT 0x200000
-#define DDHMG_HTOI(DdHandle) ((DWORD)DdHandle & (DDHMG_HANDLE_LIMIT-1))
+#define DDHMG_HTOI(DdHandle) ((DWORD_PTR)DdHandle & (DDHMG_HANDLE_LIMIT-1))
#include <windef.h>
diff --git a/win32ss/reactx/ntddraw/dxeng.c b/win32ss/reactx/ntddraw/dxeng.c
index b42220479c..f1c681f1e3 100644
--- a/win32ss/reactx/ntddraw/dxeng.c
+++ b/win32ss/reactx/ntddraw/dxeng.c
@@ -357,7 +357,7 @@ DxEngGetHdevData(HDEV hDev,
break;
case DxEGShDevData_ldev:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_ldev\n");
- retVal = (DWORD) PDev->pldev;
+ retVal = (DWORD_PTR) PDev->pldev;
break;
case DxEGShDevData_GDev:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_GDev\n");