Fix some modules
authorSamuel Serapion <samuel.serapion@gmail.com>
Mon, 7 Dec 2009 20:01:50 +0000 (20:01 +0000)
committerSamuel Serapion <samuel.serapion@gmail.com>
Mon, 7 Dec 2009 20:01:50 +0000 (20:01 +0000)
svn path=/branches/ros-amd64-bringup/; revision=44459

rostests/apitests/gdi32api/gdi32api.rbuild
rostests/dxtest/ddraw/helper.cpp
rostests/tests/bench/bench-thread.c
rostests/tests/button2/buttontst2.c
rostests/tests/capclock/capclock.c
rostests/tests/combotst/combotst.c
rostests/tests/edit/edittest.c

index 562db78..84c8525 100644 (file)
@@ -1,4 +1,4 @@
-<module name="gdi32api" type="win32cui">
+<module name="gdi32api" type="win32cui" allowwarnings="true">
        <include base="gdi32api">.</include>
        <library>apitest</library>
        <library>user32</library>
index 92bf3aa..3d6e1fd 100644 (file)
@@ -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)
        {
index 6a8e4b9..d061613 100644 (file)
@@ -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", param);
    SleepEx(INFINITE, TRUE);
    return 0;
 }
@@ -16,7 +16,7 @@ thread_main1(LPVOID param)
 DWORD WINAPI
 thread_main2(LPVOID param)
 {
-   printf("Thread 2 running (Counter %lu)\n", (DWORD)param);
+   printf("Thread 2 running (Counter %lu)\n", param);
    Sleep(INFINITE);
    return 0;
 }
@@ -34,7 +34,7 @@ int main (void)
        CreateThread(NULL,
                     0,
                     thread_main1,
-                    (LPVOID)i,
+                    (LPVOID)(ULONG_PTR)i,
                     0,
                     &id);
 
index 0fa4ed7..0564f7e 100644 (file)
@@ -58,109 +58,109 @@ WinMain(HINSTANCE hInstance,
 
   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))
   {
index 4d69e3e..5ea9d33 100644 (file)
@@ -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 @@ static INT_PTR CALLBACK DialogFunc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
        }
        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;
index 561218d..d9d718d 100644 (file)
@@ -282,7 +282,7 @@ CreateCheckButton(const char* lpWindowName, DWORD xSize, DWORD id)
         xSize,   /* nWidth  */
         20,      /* nHeight */
         g_hwnd,
-        (HMENU) id,
+        LongToHandle(id),
         g_hInst,
         NULL
         );
@@ -302,7 +302,7 @@ CreatePushButton(const char* lpWindowName, DWORD xSize, DWORD id,DWORD Style)
         xSize,   /* nWidth */
         20,      /* nHeight */
         g_hwnd,
-        (HMENU) id,
+        LongToHandle(id),
         g_hInst,
         NULL
         );
index 35ab9b5..22d23db 100644 (file)
@@ -277,7 +277,7 @@ CreateCheckButton(const char* lpWindowName, DWORD xSize, DWORD id)
                          xSize,   /* nWidth  */
                          20,      /* nHeight */
                          g_hwnd,
-                         (HMENU) id,
+                         (HMENU)(ULONG_PTR)id,
                          g_hInst,
                          NULL
                          );
@@ -297,7 +297,7 @@ CreatePushButton(const char* lpWindowName, DWORD xSize, DWORD id,DWORD Style)
                                  xSize,   // nWidth
                                  20,      // nHeight
                                              g_hwnd,
-                          (HMENU) id,
+                          (HMENU)(ULONG_PTR) id,
                           g_hInst,
                           NULL
                           );