Fix building some modules.
authorSamuel Serapion <samuel.serapion@gmail.com>
Mon, 7 Dec 2009 23:11:49 +0000 (23:11 +0000)
committerSamuel Serapion <samuel.serapion@gmail.com>
Mon, 7 Dec 2009 23:11:49 +0000 (23:11 +0000)
svn path=/branches/ros-amd64-bringup/; revision=44463

rosapps/applications/devutils/gdihv/handlelist.c
rosapps/applications/screensavers/cylfrac/cylfrac.c
rosapps/applications/screensavers/mazescr/scrnsave.c
rosapps/applications/sysutils/ctm/ctm.c
rosapps/applications/sysutils/pedump/pedump.c

index a1a3a8f..28eea95 100644 (file)
@@ -87,9 +87,9 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId)
                      (ProcessId == (HANDLE)2) )\r
                {\r
                        if (ProcessId == (HANDLE)1 || ProcessId == (HANDLE)2 ||\r
-                           ((LONG)ProcessId & 0xfffc) == ((ULONG)pEntry->ProcessId & 0xfffc))\r
+                           ((LONG_PTR)ProcessId & 0xfffc) == ((ULONG_PTR)pEntry->ProcessId & 0xfffc))\r
                        {\r
-                               handle = GDI_HANDLE_CREATE(i, pEntry->Type);\r
+                               handle = GDI_HANDLE_CREATE(i, (ULONG_PTR)pEntry->Type);\r
                                index = ListView_GetItemCount(hHandleListCtrl);\r
                                item.iItem = index;\r
                                item.iSubItem = 0;\r
@@ -107,13 +107,13 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId)
                                str2 = GetTypeName(handle);\r
                                ListView_SetItemText(hHandleListCtrl, index, 3, str2);\r
 \r
-                               wsprintf(strText, L"%#08x", (UINT)pEntry->ProcessId);\r
+                               wsprintf(strText, L"%#08x", (UINT_PTR)pEntry->ProcessId);\r
                                ListView_SetItemText(hHandleListCtrl, index, 4, strText);\r
 \r
-                               wsprintf(strText, L"%#08x", (UINT)pEntry->KernelData);\r
+                               wsprintf(strText, L"%#08x", (UINT_PTR)pEntry->KernelData);\r
                                ListView_SetItemText(hHandleListCtrl, index, 5, strText);\r
 \r
-                               wsprintf(strText, L"%#08x", (UINT)pEntry->UserData);\r
+                               wsprintf(strText, L"%#08x", (UINT_PTR)pEntry->UserData);\r
                                ListView_SetItemText(hHandleListCtrl, index, 6, strText);\r
 \r
                                wsprintf(strText, L"%#08x", (UINT)pEntry->Type);\r
index 03ed114..3d732f5 100644 (file)
@@ -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;
index 304f741..e76d029 100644 (file)
@@ -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;
index 948caf1..a0a7c26 100644 (file)
@@ -493,7 +493,7 @@ void PerfDataRefresh()
                // so that we can establish delta values
                pPDOld = NULL;
                for (Idx2=0; Idx2<ProcessCountOld; Idx2++) {
-                       if (pPerfDataOld[Idx2].ProcessId == (ULONG)(pSPI->UniqueProcessId) &&
+                       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)     {
index 15003f7..27555cb 100644 (file)
@@ -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;
 }