From 20a05a760bf8880bd03ccca16252bc6f426ca843 Mon Sep 17 00:00:00 2001 From: Samuel Serapion Date: Mon, 7 Dec 2009 23:11:49 +0000 Subject: [PATCH] Fix building some modules. svn path=/branches/ros-amd64-bringup/; revision=44463 --- rosapps/applications/devutils/gdihv/handlelist.c | 10 +++++----- rosapps/applications/screensavers/cylfrac/cylfrac.c | 6 +++--- rosapps/applications/screensavers/mazescr/scrnsave.c | 2 +- rosapps/applications/sysutils/ctm/ctm.c | 4 ++-- rosapps/applications/sysutils/pedump/pedump.c | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rosapps/applications/devutils/gdihv/handlelist.c b/rosapps/applications/devutils/gdihv/handlelist.c index a1a3a8f03ac..28eea951506 100644 --- a/rosapps/applications/devutils/gdihv/handlelist.c +++ b/rosapps/applications/devutils/gdihv/handlelist.c @@ -87,9 +87,9 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId) (ProcessId == (HANDLE)2) ) { if (ProcessId == (HANDLE)1 || ProcessId == (HANDLE)2 || - ((LONG)ProcessId & 0xfffc) == ((ULONG)pEntry->ProcessId & 0xfffc)) + ((LONG_PTR)ProcessId & 0xfffc) == ((ULONG_PTR)pEntry->ProcessId & 0xfffc)) { - handle = GDI_HANDLE_CREATE(i, pEntry->Type); + handle = GDI_HANDLE_CREATE(i, (ULONG_PTR)pEntry->Type); index = ListView_GetItemCount(hHandleListCtrl); item.iItem = index; item.iSubItem = 0; @@ -107,13 +107,13 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId) str2 = GetTypeName(handle); ListView_SetItemText(hHandleListCtrl, index, 3, str2); - wsprintf(strText, L"%#08x", (UINT)pEntry->ProcessId); + wsprintf(strText, L"%#08x", (UINT_PTR)pEntry->ProcessId); ListView_SetItemText(hHandleListCtrl, index, 4, strText); - wsprintf(strText, L"%#08x", (UINT)pEntry->KernelData); + wsprintf(strText, L"%#08x", (UINT_PTR)pEntry->KernelData); ListView_SetItemText(hHandleListCtrl, index, 5, strText); - wsprintf(strText, L"%#08x", (UINT)pEntry->UserData); + wsprintf(strText, L"%#08x", (UINT_PTR)pEntry->UserData); ListView_SetItemText(hHandleListCtrl, index, 6, strText); wsprintf(strText, L"%#08x", (UINT)pEntry->Type); diff --git a/rosapps/applications/screensavers/cylfrac/cylfrac.c b/rosapps/applications/screensavers/cylfrac/cylfrac.c index 03ed11485ea..3d732f5bc60 100644 --- a/rosapps/applications/screensavers/cylfrac/cylfrac.c +++ b/rosapps/applications/screensavers/cylfrac/cylfrac.c @@ -111,7 +111,7 @@ void DrawScene(HWND hwnd, HDC dc, int ticks) EndPaint(hwnd, &ps); } -void CALLBACK TimeProc(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2) +void CALLBACK TimeProc(UINT uID, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2) { InvalidateRect((HWND)dwUser, NULL, 0); } @@ -155,7 +155,7 @@ LRESULT WINAPI WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) GetCursorPos(&initpoint); InitGL(hwnd); oldticks = GetTickCount(); - TimerID = timeSetEvent (timerdelay, 0, TimeProc, (DWORD)hwnd, TIME_PERIODIC); + TimerID = timeSetEvent (timerdelay, 0, TimeProc, (DWORD_PTR)hwnd, TIME_PERIODIC); break; case WM_PAINT: { @@ -268,7 +268,7 @@ VOID ParseCommandLine(LPWSTR szCmdLine, UCHAR *chOption, HWND *hwndParent) if(isdigit(ch)) { unsigned int i = _wtoi(szCmdLine - 1); - *hwndParent = (HWND)i; + *hwndParent = (HWND)(ULONG_PTR)i; } else *hwndParent = NULL; diff --git a/rosapps/applications/screensavers/mazescr/scrnsave.c b/rosapps/applications/screensavers/mazescr/scrnsave.c index 304f7411537..e76d0298ba9 100644 --- a/rosapps/applications/screensavers/mazescr/scrnsave.c +++ b/rosapps/applications/screensavers/mazescr/scrnsave.c @@ -167,7 +167,7 @@ void ParseCommandLine(PSTR szCmdLine, int *chOption, HWND *hwndParent) if(isdigit(ch)) { unsigned int i = atoi(szCmdLine - 1); - *hwndParent = (HWND)i; + *hwndParent = (HWND)(ULONG_PTR)i; } else *hwndParent = 0; diff --git a/rosapps/applications/sysutils/ctm/ctm.c b/rosapps/applications/sysutils/ctm/ctm.c index 948caf126d0..a0a7c260ad5 100644 --- a/rosapps/applications/sysutils/ctm/ctm.c +++ b/rosapps/applications/sysutils/ctm/ctm.c @@ -493,7 +493,7 @@ void PerfDataRefresh() // so that we can establish delta values pPDOld = NULL; for (Idx2=0; Idx2UniqueProcessId) && + if (pPerfDataOld[Idx2].ProcessId == (ULONG_PTR)(pSPI->UniqueProcessId) && /* check also for the creation time, a new process may have an id of an old one */ pPerfDataOld[Idx2].CreateTime.QuadPart == pSPI->CreateTime.QuadPart) { pPDOld = &pPerfDataOld[Idx2]; @@ -517,7 +517,7 @@ void PerfDataRefresh() #endif } - pPerfData[Idx].ProcessId = (ULONG)(pSPI->UniqueProcessId); + pPerfData[Idx].ProcessId = (ULONG_PTR)(pSPI->UniqueProcessId); pPerfData[Idx].CreateTime = pSPI->CreateTime; if (pPDOld) { diff --git a/rosapps/applications/sysutils/pedump/pedump.c b/rosapps/applications/sysutils/pedump/pedump.c index 15003f777f2..27555cb987f 100644 --- a/rosapps/applications/sysutils/pedump/pedump.c +++ b/rosapps/applications/sysutils/pedump/pedump.c @@ -1011,7 +1011,7 @@ GetModuleEntryPoint ( PIMAGE_OPTIONAL_HEADER poh = (PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET (lpFile); if (poh != NULL) - return (LPVOID) (poh->AddressOfEntryPoint); + return (LPVOID)(ULONG_PTR)(poh->AddressOfEntryPoint); else return NULL; }