Author: tkreuzer Date: Thu Jun 3 22:08:26 2010 New Revision: 47551
URL: http://svn.reactos.org/svn/reactos?rev=47551&view=rev Log: [ROSTESTS] Fix 64 bit build of some modules (Samuel Serapion, modified by me)
Modified: trunk/rostests/ (props changed) trunk/rostests/drivers/kmtest/ntos_io.c trunk/rostests/drivers/kmtest/ntos_ob.c trunk/rostests/drivers/kmtest/reghelper.c trunk/rostests/dxtest/ddraw/helper.cpp trunk/rostests/tests/bench/bench-thread.c trunk/rostests/tests/button2/buttontst2.c trunk/rostests/tests/capclock/capclock.c trunk/rostests/tests/combotst/combotst.c trunk/rostests/tests/edit/edittest.c trunk/rostests/tests/global_mem/global_mem.c trunk/rostests/tests/isotest/isotest.c trunk/rostests/tests/map_dup_inherit/map_dup_inherit.c trunk/rostests/tests/mdi/mdi.c trunk/rostests/tests/miditest/miditest.c trunk/rostests/tests/multithrdwin/multithrdwin.c trunk/rostests/tests/p_dup_handle/p_dup_handle.c trunk/rostests/win32/user32/kbdlayout/kbdlayout.c
Propchange: trunk/rostests/ ------------------------------------------------------------------------------ svn:mergeinfo = /branches/ros-amd64-bringup/rostests:44459,44462
Modified: trunk/rostests/drivers/kmtest/ntos_io.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/drivers/kmtest/ntos_io.c?r... ============================================================================== --- trunk/rostests/drivers/kmtest/ntos_io.c [iso-8859-1] (original) +++ trunk/rostests/drivers/kmtest/ntos_io.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -46,7 +46,7 @@
ok(Mdl == NULL, "IoAllocateMdl should fail allocation of 2Gb or more, but got Mdl=0x%X", - (UINT32)Mdl); + (UINT_PTR)Mdl);
if (Mdl) IoFreeMdl(Mdl); @@ -57,10 +57,10 @@ ok(Mdl != NULL, "Mdl allocation failed"); // Check fields of the allocated struct ok(Mdl->Next == NULL, "Mdl->Next should be NULL, but is 0x%X", - (UINT32)Mdl->Next); + (UINT_PTR)Mdl->Next); ok(Mdl->ByteCount == MdlSize, "Mdl->ByteCount should be equal to MdlSize, but is 0x%X", - (UINT32)Mdl->ByteCount); + (UINT_PTR)Mdl->ByteCount); // TODO: Check other fields of MDL struct
IoFreeMdl(Mdl); @@ -70,7 +70,7 @@ Mdl = IoAllocateMdl(VirtualAddress, MdlSize, FALSE, FALSE, Irp); ok(Mdl != NULL, "Mdl allocation failed"); ok(Irp->MdlAddress == Mdl, "Irp->MdlAddress should be 0x%X, but is 0x%X", - (UINT32)Mdl, (UINT32)Irp->MdlAddress); + (UINT_PTR)Mdl, (UINT_PTR)Irp->MdlAddress);
IoFreeMdl(Mdl);
Modified: trunk/rostests/drivers/kmtest/ntos_ob.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/drivers/kmtest/ntos_ob.c?r... ============================================================================== --- trunk/rostests/drivers/kmtest/ntos_ob.c [iso-8859-1] (original) +++ trunk/rostests/drivers/kmtest/ntos_ob.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -324,7 +324,7 @@ "Object insertion should have failed, but got 0x%lX", Status); ok(ObBody[0] == ObBody1[1], "Object bodies doesn't match, 0x%p != 0x%p", ObBody[0], ObBody1[1]); - ok(ObHandle2[0] != NULL, "Bad handle returned 0x%lX", (ULONG)ObHandle2[0]); + ok(ObHandle2[0] != NULL, "Bad handle returned 0x%lX", (ULONG_PTR)ObHandle2[0]);
DPRINT1("%d %d %d %d %d %d %d\n", DumpCount, OpenCount, // deletecount+1 CloseCount, DeleteCount, ParseCount, OkayToCloseCount, QueryNameCount);
Modified: trunk/rostests/drivers/kmtest/reghelper.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/drivers/kmtest/reghelper.c... ============================================================================== --- trunk/rostests/drivers/kmtest/reghelper.c [iso-8859-1] (original) +++ trunk/rostests/drivers/kmtest/reghelper.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -75,7 +75,7 @@ /* Remove the current driver name from the string */ /* FIXME: Dont use hard coded driver name, determine it from the string returned from the above Query */ Length = (wcslen((PWCHAR)ValuePartialInfo->Data) * 2) - (wcslen(L"kmtest.sys") * 2); - RtlZeroMemory((PVOID)((ULONG)ValuePartialInfo->Data + Length), + RtlZeroMemory((PVOID)((ULONG_PTR)ValuePartialInfo->Data + Length), wcslen(L"drvtests.sys") * 2); ZwClose(ServiceKey);
Modified: trunk/rostests/dxtest/ddraw/helper.cpp URL: http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/ddraw/helper.cpp?re... ============================================================================== --- trunk/rostests/dxtest/ddraw/helper.cpp [iso-8859-1] (original) +++ trunk/rostests/dxtest/ddraw/helper.cpp [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -1,6 +1,6 @@ #include "ddrawtest.h"
-LONG WINAPI BasicWindowProc (HWND hwnd, UINT message, UINT wParam, LONG lParam) +LRESULT WINAPI BasicWindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) {
Modified: trunk/rostests/tests/bench/bench-thread.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/bench/bench-thread.c... ============================================================================== --- trunk/rostests/tests/bench/bench-thread.c [iso-8859-1] (original) +++ trunk/rostests/tests/bench/bench-thread.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -7,7 +7,7 @@ DWORD WINAPI thread_main1(LPVOID param) { - printf("Thread 1 running (Counter %lu)\n", (DWORD)param); + printf("Thread 1 running (Counter %lu)\n", PtrToUlong(param)); SleepEx(INFINITE, TRUE); return 0; } @@ -16,7 +16,7 @@ DWORD WINAPI thread_main2(LPVOID param) { - printf("Thread 2 running (Counter %lu)\n", (DWORD)param); + printf("Thread 2 running (Counter %lu)\n", PtrToUlong(param)); Sleep(INFINITE); return 0; } @@ -34,7 +34,7 @@ CreateThread(NULL, 0, thread_main1, - (LPVOID)i, + (LPVOID)(ULONG_PTR)i, 0, &id);
Modified: trunk/rostests/tests/button2/buttontst2.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/button2/buttontst2.c... ============================================================================== --- trunk/rostests/tests/button2/buttontst2.c [iso-8859-1] (original) +++ trunk/rostests/tests/button2/buttontst2.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -58,109 +58,109 @@
hbtn[0] = CreateWindow( "BUTTON","BS_DEFPUSHBUTTON",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 10, 10, 200, 40, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 10, 200, 40, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[1] = CreateWindow( "BUTTON","BS_3STATE",WS_VISIBLE | WS_CHILD | BS_3STATE, - 10, 60, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 60, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[2] = CreateWindow( "BUTTON","BS_AUTO3STATE",WS_VISIBLE | WS_CHILD | BS_AUTO3STATE, - 10, 90, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 90, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[3] = CreateWindow( "BUTTON","BS_AUTOCHECKBOX",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX, - 10, 120, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 120, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[4] = CreateWindow( "BUTTON","BS_AUTORADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON, - 10, 150, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 150, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[5] = CreateWindow( "BUTTON","BS_CHECKBOX",WS_VISIBLE | WS_CHILD | BS_CHECKBOX, - 10, 180, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 180, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[6] = CreateWindow( "BUTTON","BS_GROUPBOX",WS_VISIBLE | WS_CHILD | BS_GROUPBOX, - 10, 210, 200, 80, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 210, 200, 80, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[7] = CreateWindow( "BUTTON","BS_PUSHBUTTON",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON, - 20, 230, 180, 30, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 20, 230, 180, 30, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[8] = CreateWindow( "BUTTON","BS_RADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON, - 10, 300, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 300, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[9] = CreateWindow( "BUTTON","BS_AUTORADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON, - 220, 160, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 220, 160, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[10] = CreateWindow( "BUTTON","BS_DEFPUSHBUTTON|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_BOTTOM, - 220, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 220, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[11] = CreateWindow( "BUTTON","BS_DEFPUSHBUTTON|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_LEFT, - 480, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 480, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[12] = CreateWindow( "BUTTON","BS_DEFPUSHBUTTON|BS_RIGHT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_RIGHT |BS_MULTILINE, - 740, 10, 150, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 740, 10, 150, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[13] = CreateWindow( "BUTTON","BS_AUTORADIOBUTTON|BS_TOP",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_TOP, - 220, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 220, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
// Other Combinations
hbtn[14] = CreateWindow( "BUTTON","BS_AUTORADIOBUTTON|BS_BOTTOM|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_BOTTOM | BS_MULTILINE, - 480, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 480, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[15] = CreateWindow( "BUTTON","BS_AUTORADIOBUTTON|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_LEFT, - 740, 80, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 740, 80, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[16] = CreateWindow( "BUTTON","BS_AUTORADIOBUTTON|BS_RIGHT|BS_TOP",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_RIGHT | BS_TOP, - 220, 130, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 220, 130, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[17] = CreateWindow( "BUTTON","BS_AUTORADIOBUTTON|BS_TOP|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_TOP| BS_MULTILINE, - 480, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 480, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[18] = CreateWindow( "BUTTON","BS_AUTOCHECKBOX|BS_BOTTOM|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_BOTTOM | BS_MULTILINE, - 740, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 740, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[19] = CreateWindow( "BUTTON","BS_AUTOCHECKBOX|BS_TOP|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE, - 480, 190, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 480, 190, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[20] = CreateWindow( "BUTTON","BS_AUTOCHECKBOX|BS_LEFT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE, - 220, 230, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 220, 230, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[21] = CreateWindow( "BUTTON","BS_AUTOCHECKBOX|BS_RIGHT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_RIGHT | BS_MULTILINE, - 480, 240, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 480, 240, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[22] = CreateWindow( "BUTTON","BS_GROUPBOX|BS_TOP",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_TOP, - 10, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[23] = CreateWindow( "BUTTON","BS_GROUPBOX|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_BOTTOM, - 10, 410, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 10, 410, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[24] = CreateWindow( "BUTTON","BS_GROUPBOXBOX|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_LEFT, - 520, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 520, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[25] = CreateWindow( "BUTTON","BS_GROUPBOX|BS_RIGHT|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_BOTTOM | BS_RIGHT, - 300, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL); + 300, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
while(GetMessage(&msg, NULL, 0, 0)) {
Modified: trunk/rostests/tests/capclock/capclock.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/capclock/capclock.c?... ============================================================================== --- trunk/rostests/tests/capclock/capclock.c [iso-8859-1] (original) +++ trunk/rostests/tests/capclock/capclock.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -11,8 +11,8 @@
UINT Timer = 1;
-static BOOL CALLBACK DialogFunc(HWND,UINT,WPARAM,LPARAM); -static VOID CALLBACK TimerProc(HWND,UINT,UINT,DWORD); +static INT_PTR CALLBACK DialogFunc(HWND,UINT,WPARAM,LPARAM); +static VOID CALLBACK TimerProc(HWND,UINT,UINT_PTR,DWORD);
INT WINAPI WinMain (HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, INT nCmdShow) @@ -50,7 +50,7 @@ } return FALSE; } -static VOID CALLBACK TimerProc (HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime) +static VOID CALLBACK TimerProc (HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { CHAR text [20]; SYSTEMTIME lt;
Modified: trunk/rostests/tests/combotst/combotst.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/combotst/combotst.c?... ============================================================================== --- trunk/rostests/tests/combotst/combotst.c [iso-8859-1] (original) +++ trunk/rostests/tests/combotst/combotst.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -282,7 +282,7 @@ xSize, /* nWidth */ 20, /* nHeight */ g_hwnd, - (HMENU) id, + UlongToHandle(id), g_hInst, NULL ); @@ -302,7 +302,7 @@ xSize, /* nWidth */ 20, /* nHeight */ g_hwnd, - (HMENU) id, + LongToHandle(id), g_hInst, NULL );
Modified: trunk/rostests/tests/edit/edittest.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/edit/edittest.c?rev=... ============================================================================== --- trunk/rostests/tests/edit/edittest.c [iso-8859-1] (original) +++ trunk/rostests/tests/edit/edittest.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -277,7 +277,7 @@ xSize, /* nWidth */ 20, /* nHeight */ g_hwnd, - (HMENU) id, + UlongToHandle(id), g_hInst, NULL ); @@ -297,7 +297,7 @@ xSize, // nWidth 20, // nHeight g_hwnd, - (HMENU) id, + (HMENU)(ULONG_PTR) id, g_hInst, NULL );
Modified: trunk/rostests/tests/global_mem/global_mem.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/global_mem/global_me... ============================================================================== --- trunk/rostests/tests/global_mem/global_mem.c [iso-8859-1] (original) +++ trunk/rostests/tests/global_mem/global_mem.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -143,6 +143,13 @@ { char buffer[32]; sprintf(buffer, "0x%lX",dw); + OUTPUT_Line(buffer); +} + +void OUTPUT_Handle(HANDLE h) +{ + char buffer[32]; + sprintf(buffer, "0x%p", h); OUTPUT_Line(buffer); }
@@ -412,9 +419,9 @@ else { OUTPUT_Line("Alloced Handle: "); - OUTPUT_HexDword((DWORD)hMem); + OUTPUT_Handle(hMem); OUTPUT_Line("ReAlloced Handle: "); - OUTPUT_HexDword((DWORD)hReAlloced); + OUTPUT_Handle(hReAlloced); if (hMem == hReAlloced) { OUTPUT_Line("GlobalReAlloc returned the same pointer. The documentation states that this is wrong, but Windows NT works this way."); @@ -455,9 +462,9 @@ else { OUTPUT_Line("Alloced Handle: "); - OUTPUT_HexDword((DWORD)hMem); + OUTPUT_Handle(hMem); OUTPUT_Line("ReAlloced Handle: "); - OUTPUT_HexDword((DWORD)hReAlloced); + OUTPUT_Handle(hReAlloced); if (hMem != hReAlloced) { OUTPUT_Line("GlobalReAlloc returned a different."); @@ -516,9 +523,9 @@ else { OUTPUT_Line("Alloced Handle: "); - OUTPUT_HexDword((DWORD)hMem); + OUTPUT_Handle(hMem); OUTPUT_Line("ReAlloced Handle: "); - OUTPUT_HexDword((DWORD)hReAlloced); + OUTPUT_Handle(hReAlloced);
pMem = GlobalLock(hReAlloced); hMem = hReAlloced; @@ -559,9 +566,9 @@ else { OUTPUT_Line("Alloced Handle: "); - OUTPUT_HexDword((DWORD)hMem); + OUTPUT_Handle(hMem); OUTPUT_Line("ReAlloced Handle: "); - OUTPUT_HexDword((DWORD)hReAlloced); + OUTPUT_Handle(hReAlloced); if (hMem != hReAlloced) { OUTPUT_Line("GlobalReAlloc returned a different block."); @@ -638,7 +645,7 @@ OUTPUT_Result(result);
OUTPUT_Line("Pointer from handle: "); - OUTPUT_HexDword((DWORD)GlobalLock(hMem)); + OUTPUT_Handle(GlobalLock(hMem));
OUTPUT_Line("Testing after a lock"); OUTPUT_Line("Testing for a lock of 1"); @@ -679,7 +686,7 @@ if (0 != hMem) { OUTPUT_Line("Allocation handle: "); - OUTPUT_HexDword((DWORD)hMem); + OUTPUT_Handle(hMem); OUTPUT_Line("Testing for a discarded flag"); uFlags = GlobalFlags(hMem); if (0 != (uFlags & GMEM_DISCARDED)) /*discarded*/ @@ -720,7 +727,7 @@ {
OUTPUT_Line("Allocation handle: "); - OUTPUT_HexDword((DWORD)hMem); + OUTPUT_Handle(hMem);
OUTPUT_Line("Testing initial allocation"); OUTPUT_Line("Testing for non-discarded and lock of 0"); @@ -737,7 +744,7 @@ OUTPUT_Result(result);
OUTPUT_Line("Pointer from handle: "); - OUTPUT_HexDword((DWORD)GlobalLock(hMem)); + OUTPUT_Handle(GlobalLock(hMem)); OUTPUT_Line("Testing after a lock"); OUTPUT_Line("Testing for non-discarded and lock of 0"); uFlags = GlobalFlags(hMem); @@ -796,7 +803,7 @@ {
OUTPUT_Line("Allocation handle: "); - OUTPUT_HexDword((DWORD)hMem); + OUTPUT_Handle(hMem);
hTest = GlobalHandle(hMem); if (hMem == hTest) @@ -806,7 +813,7 @@ else { OUTPUT_Line("GlobalHandle returned:"); - OUTPUT_HexDword((DWORD)hTest); + OUTPUT_Handle(hTest); subtest = TEST_CombineStatus(subtest, FAILED); }
@@ -830,7 +837,7 @@ {
OUTPUT_Line("Allocation handle: "); - OUTPUT_HexDword((DWORD)hMem); + OUTPUT_Handle(hMem); pMem = GlobalLock(hMem); hTest = GlobalHandle(pMem); if (hMem == hTest) @@ -840,7 +847,7 @@ else { OUTPUT_Line("GlobalHandle returned:"); - OUTPUT_HexDword((DWORD)hTest); + OUTPUT_Handle(hTest); subtest = TEST_CombineStatus(subtest, FAILED); }
@@ -979,7 +986,7 @@ if (0 != hMem) { OUTPUT_Line("Allocation handle: "); - OUTPUT_HexDword((DWORD)hMem); + OUTPUT_Handle(hMem);
hTest = GlobalDiscard(hMem); if (0 == hTest)
Modified: trunk/rostests/tests/isotest/isotest.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/isotest/isotest.c?re... ============================================================================== --- trunk/rostests/tests/isotest/isotest.c [iso-8859-1] (original) +++ trunk/rostests/tests/isotest/isotest.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -21,7 +21,7 @@
while (offset < (size & ~15)) { - ptr = (unsigned char*)((ULONG)buffer + offset); + ptr = (unsigned char*)((ULONG_PTR)buffer + offset); printf("%08lx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx-%02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx", offset, ptr[0], @@ -62,7 +62,7 @@ offset += 16; }
- ptr = (unsigned char*)((ULONG)buffer + offset); + ptr = (unsigned char*)((ULONG_PTR)buffer + offset); if (offset < size) { printf("%08lx ", offset);
Modified: trunk/rostests/tests/map_dup_inherit/map_dup_inherit.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/map_dup_inherit/map_... ============================================================================== --- trunk/rostests/tests/map_dup_inherit/map_dup_inherit.c [iso-8859-1] (original) +++ trunk/rostests/tests/map_dup_inherit/map_dup_inherit.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -17,7 +17,7 @@
if( argc == 2 ) { #ifdef WIN64 - file_map = (void *)atoi64(argv[1]); + file_map = (void *)_atoi64(argv[1]); #else file_map = (void *)UlongToPtr(atoi(argv[1])); #endif
Modified: trunk/rostests/tests/mdi/mdi.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/mdi/mdi.c?rev=47551&... ============================================================================== --- trunk/rostests/tests/mdi/mdi.c [iso-8859-1] (original) +++ trunk/rostests/tests/mdi/mdi.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -160,7 +160,7 @@ mcs.y = mcs.cy = CW_USEDEFAULT; mcs.style = MDIS_ALLCHILDSTYLES;
- hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LONG)&mcs); + hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LPARAM)&mcs); if(!hChild) { MessageBox(hMDIClient, "MDI Child creation failed.", "Oh Oh...",
Modified: trunk/rostests/tests/miditest/miditest.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/miditest/miditest.c?... ============================================================================== --- trunk/rostests/tests/miditest/miditest.c [iso-8859-1] (original) +++ trunk/rostests/tests/miditest/miditest.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -36,7 +36,7 @@ printf("Opening MIDI output #0\n");
Result = midiOutOpen(&Handle, 0, 0, 0, CALLBACK_NULL); - printf("Result == %d Handle == %d\n", Result, (int)Handle); + printf("Result == %d Handle == %p\n", Result, Handle);
// play something: midiOutShortMsg(Handle, 0x007f3090);
Modified: trunk/rostests/tests/multithrdwin/multithrdwin.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/multithrdwin/multith... ============================================================================== --- trunk/rostests/tests/multithrdwin/multithrdwin.c [iso-8859-1] (original) +++ trunk/rostests/tests/multithrdwin/multithrdwin.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -157,7 +157,7 @@ HDC hDC; RECT Client; HBRUSH Brush; - DWORD Ret; + DWORD_PTR Ret;
static COLORREF Colors[] = {
Modified: trunk/rostests/tests/p_dup_handle/p_dup_handle.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/tests/p_dup_handle/p_dup_h... ============================================================================== --- trunk/rostests/tests/p_dup_handle/p_dup_handle.c [iso-8859-1] (original) +++ trunk/rostests/tests/p_dup_handle/p_dup_handle.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -15,7 +15,7 @@ fprintf( stderr, "%lu: Starting\n", GetCurrentProcessId() );
if( argc == 2 ) { - h_process = (HANDLE)atoi(argv[1]); + h_process = (HANDLE)(ULONG_PTR)atoi(argv[1]); } else { if( !DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), @@ -38,7 +38,7 @@ memset( &si, 0, sizeof( si ) ); memset( &pi, 0, sizeof( pi ) );
- sprintf( cmdline, "%s %lu", argv[0], (DWORD)h_process ); + sprintf( cmdline, "%s %p", argv[0], h_process ); if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi ) ) { fprintf( stderr, "%lu: Could not create child process.\n",
Modified: trunk/rostests/win32/user32/kbdlayout/kbdlayout.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/win32/user32/kbdlayout/kbd... ============================================================================== --- trunk/rostests/win32/user32/kbdlayout/kbdlayout.c [iso-8859-1] (original) +++ trunk/rostests/win32/user32/kbdlayout/kbdlayout.c [iso-8859-1] Thu Jun 3 22:08:26 2010 @@ -122,7 +122,7 @@
LRESULT CALLBACK WndSubclassProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - WND_DATA *data = (WND_DATA*)GetWindowLong(hwnd, GWL_USERDATA); + WND_DATA *data = (WND_DATA*)GetWindowLongPtr(hwnd, GWL_USERDATA);
if(uMsg == WM_INPUTLANGCHANGE) { @@ -143,9 +143,9 @@ void SubclassWnd(HWND hWnd, WCHAR* Name) { WND_DATA *data = HeapAlloc(GetProcessHeap(), 0, sizeof(WND_DATA)); - data->OrigProc = (WNDPROC)SetWindowLong( hWnd, GWL_WNDPROC, (LONG)WndSubclassProc); + data->OrigProc = (WNDPROC)SetWindowLongPtr( hWnd, GWL_WNDPROC, (LONG_PTR)WndSubclassProc); wcsncpy(data->WndName, Name, 25); - SetWindowLong(hWnd, GWL_USERDATA, (LONG)data); + SetWindowLongPtr(hWnd, GWL_USERDATA, (LONG_PTR)data); return; }