[GDI32_APITEST]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 28 Oct 2013 20:39:26 +0000 (20:39 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 28 Oct 2013 20:39:26 +0000 (20:39 +0000)
- Add more tests for CreateDIBitmap and SetDIBitsToDevice

svn path=/trunk/; revision=60787

rostests/apitests/gdi32/CreateDIBitmap.c
rostests/apitests/gdi32/SetDIBitsToDevice.c

index e0aca1b..b9567d5 100644 (file)
@@ -65,7 +65,7 @@ GetExpected(
             return FALSE;
         }
 
-        if ((fdwInit & CBM_INIT))
+        if (fdwInit & CBM_INIT)
         {
             if (!lpbInit || (lpbInit == (PVOID)0xC0000000)) return FALSE;
         }
@@ -74,26 +74,26 @@ GetExpected(
         {
             return FALSE;
         }
-
-        return TRUE;
     }
-
-    if ((lpbmih == NULL) ||
-        (lpbmih == (PVOID)0xC0000000) ||
-        (lpbmih->biSize == 0))
+    else
     {
-        return FALSE;
-    }
 
-    if (hdc == (HDC)-1)
-    {
-        *pdwError = ERROR_INVALID_PARAMETER;
-        return FALSE;
-    }
+        if ((lpbmih == NULL) ||
+            (lpbmih == (PVOID)0xC0000000) ||
+            (lpbmih->biSize == 0))
+        {
+            return FALSE;
+        }
 
+        if (hdc == (HDC)-1)
+        {
+            *pdwError = ERROR_INVALID_PARAMETER;
+            return FALSE;
+        }
 
-    if (lpbmi == (PVOID)0xc0000000) return FALSE;
 
+        if (lpbmi == (PVOID)0xc0000000) return FALSE;
+    }
 
     return TRUE;
 }
@@ -400,7 +400,7 @@ void Test_CreateDIBitmap_RLE8()
 
     PackedDIB.bmiHeader.biSizeImage = 0;
     hbmp = CreateDIBitmap(hdc, &PackedDIB.bmiHeader, CBM_INIT, &PackedDIB.ajBuffer, (PVOID)&PackedDIB, DIB_PAL_COLORS);
-    ok(hbmp == 0, "CreateDIBitmap succeeded, expeted failure\n");
+    ok(hbmp == 0, "CreateDIBitmap succeeded, expected failure\n");
     ok_err(0xbadbad00);
 
     /* Test a line that is too long */
@@ -420,14 +420,72 @@ Test_CreateDIBitmap_CBM_CREATDIB(void)
     HBITMAP hbmp, hbmpOld;
     HDC hdc;
     BITMAPINFO bmi =
-        {{sizeof(BITMAPINFOHEADER), 4, 4, 1, 8, BI_RGB, 0, 1, 1, 1, 0}, {{0,0,0,0}}};
-    BYTE ajBits[10];
+        {{sizeof(BITMAPINFOHEADER), 4, 4, 1, 8, BI_RGB, 0, 1, 1, 1, 0}, {{0,1,2,3}}};
+    BYTE ajBits[10] = {0,1,2,3,4,5,6,7,8,9};
     BITMAP bitmap;
+    struct
+    {
+        BITMAPINFOHEADER bmiHeader;
+        WORD wColors[4];
+    } bmiRLE =
+    {
+        {sizeof(BITMAPINFOHEADER), 8, 2, 1, 8, BI_RLE8, 20, 1, 1, 4, 0},
+        {0, 1, 2, 7}
+    };
+    BYTE ajBitsRLE[] = {4,0,   0,2,0,1,0,2,3,1,   2,1, 2,2,   1,3,1,0,1,2, };
 
     hdc = CreateCompatibleDC(0);
-    ok(hdc != 0, "failed\n");
+    if (hdc == NULL)
+    {
+        ok(0, "CreateCompatibleDC failed. Skipping tests!\n");
+        return;
+    }
 
-    hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, CBM_CREATDIB, ajBits, &bmi, DIB_PAL_COLORS);
+    SetLastError(0xbadbad00);
+    hbmp = CreateDIBitmap(hdc, NULL, CBM_CREATDIB, ajBits, NULL, DIB_RGB_COLORS);
+    ok(hbmp == 0, "CreateDIBitmap should fail.\n");
+    ok_int(GetLastError(), 0xbadbad00);
+
+    hbmp = CreateDIBitmap(hdc, NULL, CBM_CREATDIB, ajBits, &bmi, DIB_RGB_COLORS);
+    ok(hbmp != 0, "CreateDIBitmap failed.\n");
+
+    ok_long(GetObject(hbmp, sizeof(DIBSECTION), &bitmap), sizeof(BITMAP));
+    ok_int(bitmap.bmType, 0);
+    ok_int(bitmap.bmWidth, 4);
+    ok_int(bitmap.bmHeight, 4);
+    ok_int(bitmap.bmWidthBytes, 4);
+    ok_int(bitmap.bmPlanes, 1);
+    ok_int(bitmap.bmBitsPixel, 8);
+    ok_ptr(bitmap.bmBits, 0);
+
+    hbmpOld = SelectObject(hdc, hbmp);
+    ok(hbmpOld != NULL, "Couldn't select the bitmap.\n");
+
+    /* Copy it on a dib section */
+    memset(pulDIB32Bits, 0x77, 64);
+    ok_long(BitBlt(ghdcDIB32, 0, 0, 4, 4, hdc, 0, 0, SRCCOPY), 1);
+    ok_long(pulDIB32Bits[0], 0x20100);
+    ok_long(pulDIB32Bits[1], 0x20100);
+    ok_long(pulDIB32Bits[2], 0x20100);
+    ok_long(pulDIB32Bits[3], 0x20100);
+
+    SelectObject(hdc, hbmpOld);
+    DeleteObject(hbmp);
+
+    hbmp = CreateDIBitmap(hdc, NULL, CBM_CREATDIB | CBM_INIT, ajBits, &bmi, DIB_PAL_COLORS);
+    ok(hbmp != 0, "CreateDIBitmap failed.\n");
+
+    ok_long(GetObject(hbmp, sizeof(DIBSECTION), &bitmap), sizeof(BITMAP));
+    ok_int(bitmap.bmType, 0);
+    ok_int(bitmap.bmWidth, 4);
+    ok_int(bitmap.bmHeight, 4);
+    ok_int(bitmap.bmWidthBytes, 4);
+    ok_int(bitmap.bmPlanes, 1);
+    ok_int(bitmap.bmBitsPixel, 8);
+    ok_ptr(bitmap.bmBits, 0);
+
+    /* Even with CBM_INIT and lpbmih != 0, pbmi is used for the dimensions */
+    hbmp = CreateDIBitmap(hdc, &bmiRLE.bmiHeader, CBM_CREATDIB | CBM_INIT, ajBits, &bmi, DIB_PAL_COLORS);
     ok(hbmp != 0, "CreateDIBitmap failed.\n");
 
     ok_long(GetObject(hbmp, sizeof(DIBSECTION), &bitmap), sizeof(BITMAP));
@@ -441,8 +499,33 @@ Test_CreateDIBitmap_CBM_CREATDIB(void)
 
     hbmpOld = SelectObject(hdc, hbmp);
     ok(hbmpOld != NULL, "Couldn't select the bitmap.\n");
+
+    /* Copy it on a dib section */
+    memset(pulDIB32Bits, 0x77, 64);
+    ok_long(BitBlt(ghdcDIB32, 0, 0, 4, 4, hdc, 0, 0, SRCCOPY), 1);
+    ok_long(pulDIB32Bits[0], 0);
+    ok_long(pulDIB32Bits[1], 0);
+    ok_long(pulDIB32Bits[2], 0);
+    ok_long(pulDIB32Bits[3], 0);
+
     SelectObject(hdc, hbmpOld);
     DeleteObject(hbmp);
+
+    hbmp = CreateDIBitmap(hdc, NULL, CBM_CREATDIB, ajBitsRLE, (PVOID)&bmiRLE, DIB_PAL_COLORS);
+    ok(hbmp == 0, "CreateDIBitmap should fail.\n");
+    hbmp = CreateDIBitmap(hdc, NULL, CBM_INIT | CBM_CREATDIB, ajBitsRLE, (PVOID)&bmiRLE, DIB_PAL_COLORS);
+    ok(hbmp == 0, "CreateDIBitmap should fail.\n");
+
+    /* Check if a 0 pixel bitmap results in the DEFAULT_BITMAP being returned */
+    bmi.bmiHeader.biWidth = 0;
+    bmi.bmiHeader.biHeight = 4;
+    hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, CBM_CREATDIB, ajBits, &bmi, DIB_PAL_COLORS);
+    ok(hbmp == GetStockObject(21), "CreateDIBitmap didn't return the default bitmap.\n");
+    bmi.bmiHeader.biWidth = 23;
+    bmi.bmiHeader.biHeight = 0;
+    hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, CBM_CREATDIB, ajBits, &bmi, DIB_PAL_COLORS);
+    ok(hbmp == GetStockObject(21), "CreateDIBitmap didn't return the default bitmap.\n");
+
     DeleteDC(hdc);
 }
 
index 8b36866..470b670 100644 (file)
@@ -21,7 +21,7 @@ Test_SetDIBitsToDevice_Params()
     /* Setup the bitmap info */
     pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
     pbmi->bmiHeader.biWidth = 2;
-    pbmi->bmiHeader.biHeight = -2;
+    pbmi->bmiHeader.biHeight = -4;
     pbmi->bmiHeader.biPlanes = 1;
     pbmi->bmiHeader.biBitCount = 32;
     pbmi->bmiHeader.biCompression = BI_RGB;
@@ -31,6 +31,7 @@ Test_SetDIBitsToDevice_Params()
     pbmi->bmiHeader.biClrUsed = 0;
     pbmi->bmiHeader.biClrImportant = 0;
 
+    /* Test a normal operation */
     SetLastError(0xdeadc0de);
     ret = SetDIBitsToDevice(ghdcDIB32,
                             0, // XDest,
@@ -47,8 +48,9 @@ Test_SetDIBitsToDevice_Params()
     ok_dec(ret, 2);
     ok_err(0xdeadc0de);
 
+    /* Test hdc == NULL */
     SetLastError(0xdeadc0de);
-    ret = SetDIBitsToDevice(ghdcDIB32,
+    ret = SetDIBitsToDevice(NULL,
                             0, // XDest,
                             0, // YDest,
                             2, // dwWidth,
@@ -57,10 +59,44 @@ Test_SetDIBitsToDevice_Params()
                             0, // YSrc,
                             0, // uStartScan,
                             2, // cScanLines,
-                            NULL, // lpvBits,
+                            aulBits, // lpvBits,
+                            pbmi,
+                            DIB_RGB_COLORS);
+    ok_dec(ret, 0);
+    ok_err(ERROR_INVALID_HANDLE);
+
+    /* Test truncated hdc */
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice((HDC)((ULONG_PTR)ghdcDIB32 & 0xFFFF),
+                            0, // XDest,
+                            0, // YDest,
+                            2, // dwWidth,
+                            2, // dwHeight,
+                            0, // XSrc,
+                            0, // YSrc,
+                            0, // uStartScan,
+                            2, // cScanLines,
+                            aulBits, // lpvBits,
                             pbmi,
                             DIB_RGB_COLORS);
     ok_dec(ret, 0);
+    ok_err(ERROR_INVALID_HANDLE);
+
+    /* Test invalid ColorUse */
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice(ghdcDIB32,
+                            0, // XDest,
+                            0, // YDest,
+                            2, // dwWidth,
+                            2, // dwHeight,
+                            0, // XSrc,
+                            0, // YSrc,
+                            0, // uStartScan,
+                            2, // cScanLines,
+                            aulBits, // lpvBits,
+                            pbmi,
+                            7);
+    ok_dec(ret, 0);
     ok_err(0xdeadc0de);
 
     /* test unaligned buffer */
@@ -90,11 +126,11 @@ Test_SetDIBitsToDevice_Params()
                             0, // XSrc,
                             0, // YSrc,
                             0, // uStartScan,
-                            2000000, // cScanLines,
+                            20000000, // cScanLines,
                             (BYTE*)aulBits + 1, // lpvBits,
                             pbmi,
                             DIB_RGB_COLORS);
-    ok_dec(ret, 0);
+    todo_ros ok_dec(ret, 0);
     ok_err(0xdeadc0de);
 
     /* test unaligned illegal buffer */
@@ -111,9 +147,10 @@ Test_SetDIBitsToDevice_Params()
                             (BYTE*)0x7fffffff, // lpvBits,
                             pbmi,
                             DIB_RGB_COLORS);
-    ok_dec(ret, 0);
+    todo_ros ok_dec(ret, 0);
     ok_err(0xdeadc0de);
 
+    /* Test negative XDest */
     SetLastError(0xdeadc0de);
     ret = SetDIBitsToDevice(ghdcDIB32,
                             -100, // XDest,
@@ -130,6 +167,7 @@ Test_SetDIBitsToDevice_Params()
     ok_dec(ret, 2);
     ok_err(0xdeadc0de);
 
+    /* Test huge XDest */
     SetLastError(0xdeadc0de);
     ret = SetDIBitsToDevice(ghdcDIB32,
                             LONG_MAX, // XDest,
@@ -146,6 +184,7 @@ Test_SetDIBitsToDevice_Params()
     ok_dec(ret, 2);
     ok_err(0xdeadc0de);
 
+    /* Test XSrc outside of the DIB */
     SetLastError(0xdeadc0de);
     ret = SetDIBitsToDevice(ghdcDIB32,
                             0, // XDest,
@@ -162,6 +201,7 @@ Test_SetDIBitsToDevice_Params()
     ok_dec(ret, 2);
     ok_err(0xdeadc0de);
 
+    /* Test YSrc outside of the DIB */
     SetLastError(0xdeadc0de);
     ret = SetDIBitsToDevice(ghdcDIB32,
                             0, // XDest,
@@ -178,6 +218,24 @@ Test_SetDIBitsToDevice_Params()
     ok_dec(ret, 2);
     ok_err(0xdeadc0de);
 
+    /* Test uStartScan outside of the DIB */
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice(ghdcDIB32,
+                            0, // XDest,
+                            0, // YDest,
+                            2, // dwWidth,
+                            2, // dwHeight,
+                            0, // XSrc,
+                            0, // YSrc,
+                            100, // uStartScan,
+                            5, // cScanLines,
+                            aulBits, // lpvBits,
+                            pbmi,
+                            DIB_RGB_COLORS);
+    ok_dec(ret, 5);
+    ok_err(0xdeadc0de);
+
+    /* Test cScanLines larger than the DIB */
     SetLastError(0xdeadc0de);
     ret = SetDIBitsToDevice(ghdcDIB32,
                             0, // XDest,
@@ -187,13 +245,14 @@ Test_SetDIBitsToDevice_Params()
                             0, // XSrc,
                             0, // YSrc,
                             0, // uStartScan,
-                            66, // cScanLines,
+                            7, // cScanLines,
                             aulBits, // lpvBits,
                             pbmi,
                             DIB_RGB_COLORS);
-    ok_dec(ret, 66);
+    todo_ros ok_dec(ret, 7);
     ok_err(0xdeadc0de);
 
+    /* Test large cScanlines */
     SetLastError(0xdeadc0de);
     ret = SetDIBitsToDevice(ghdcDIB32,
                             0, // XDest,
@@ -203,13 +262,14 @@ Test_SetDIBitsToDevice_Params()
                             0, // XSrc,
                             0, // YSrc,
                             0, // uStartScan,
-                            200, // cScanLines,
+                            2000, // cScanLines,
                             aulBits, // lpvBits,
                             pbmi,
                             DIB_RGB_COLORS);
-    ok_dec(ret, 0);
+    todo_ros ok_dec(ret, 0);
     ok_err(0xdeadc0de);
 
+    /* Test uStartScan and cScanLines larger than the DIB */
     SetLastError(0xdeadc0de);
     ret = SetDIBitsToDevice(ghdcDIB32,
                             0, // XDest,
@@ -218,12 +278,29 @@ Test_SetDIBitsToDevice_Params()
                             2, // dwHeight,
                             0, // XSrc,
                             0, // YSrc,
-                            2000, // uStartScan,
-                            66, // cScanLines,
+                            100, // uStartScan,
+                            7, // cScanLines,
                             aulBits, // lpvBits,
                             pbmi,
                             DIB_RGB_COLORS);
-    ok_dec(ret, 66);
+    ok_dec(ret, 7);
+    ok_err(0xdeadc0de);
+
+    /* Test lpvBits == NULL */
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice(ghdcDIB32,
+                            0, // XDest,
+                            0, // YDest,
+                            2, // dwWidth,
+                            2, // dwHeight,
+                            0, // XSrc,
+                            0, // YSrc,
+                            0, // uStartScan,
+                            2, // cScanLines,
+                            NULL, // lpvBits,
+                            pbmi,
+                            DIB_RGB_COLORS);
+    ok_dec(ret, 0);
     ok_err(0xdeadc0de);
 
     /* Test pbmi == NULL */
@@ -243,7 +320,114 @@ Test_SetDIBitsToDevice_Params()
     ok_dec(ret, 0);
     ok_err(0xdeadc0de);
 
-    /* Test illegal bitmap info */
+    /* Test huge positive DIB height, result is limited to dwHeight */
+    pbmi->bmiHeader.biHeight = 10000;
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice(ghdcDIB32,
+                            0, // XDest,
+                            1, // YDest,
+                            2, // dwWidth,
+                            3, // dwHeight,
+                            0, // XSrc,
+                            1, // YSrc,
+                            0, // uStartScan,
+                            7, // cScanLines,
+                            aulBits, // lpvBits,
+                            pbmi,
+                            DIB_RGB_COLORS);
+    ok_dec(ret, 4);
+    ok_err(0xdeadc0de);
+
+    /* Test huge negative DIB height */
+    pbmi->bmiHeader.biHeight = -10000;
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice(ghdcDIB32,
+                            0, // XDest,
+                            0, // YDest,
+                            2, // dwWidth,
+                            2, // dwHeight,
+                            0, // XSrc,
+                            0, // YSrc,
+                            0, // uStartScan,
+                            7, // cScanLines,
+                            aulBits, // lpvBits,
+                            pbmi,
+                            DIB_RGB_COLORS);
+    ok_dec(ret, 7);
+    ok_err(0xdeadc0de);
+
+    /* Test what happens when we cause an integer overflow */
+    pbmi->bmiHeader.biHeight = LONG_MIN;
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice(ghdcDIB32,
+                            0, // XDest,
+                            0, // YDest,
+                            2, // dwWidth,
+                            2, // dwHeight,
+                            0, // XSrc,
+                            0, // YSrc,
+                            0, // uStartScan,
+                            2, // cScanLines,
+                            aulBits, // lpvBits,
+                            pbmi,
+                            DIB_RGB_COLORS);
+    ok_dec(ret, 2);
+    ok_err(0xdeadc0de);
+
+    /* Now also test a huge value of uStartScan */
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice(ghdcDIB32,
+                            0, // XDest,
+                            0, // YDest,
+                            2, // dwWidth,
+                            2, // dwHeight,
+                            0, // XSrc,
+                            0, // YSrc,
+                            abs(pbmi->bmiHeader.biHeight) - 3, // uStartScan,
+                            9, // cScanLines,
+                            aulBits, // lpvBits,
+                            pbmi,
+                            DIB_RGB_COLORS);
+    ok_dec(ret, 3);
+    ok_err(0xdeadc0de);
+
+    /* Now also test a huge value of uStartScan */
+    pbmi->bmiHeader.biHeight = LONG_MIN + 1;
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice(ghdcDIB32,
+                            0, // XDest,
+                            0, // YDest,
+                            2, // dwWidth,
+                            2, // dwHeight,
+                            0, // XSrc,
+                            0, // YSrc,
+                            abs(pbmi->bmiHeader.biHeight) - 3, // uStartScan,
+                            9, // cScanLines,
+                            aulBits, // lpvBits,
+                            pbmi,
+                            DIB_RGB_COLORS);
+    ok_dec(ret, 5);
+    ok_err(0xdeadc0de);
+
+    /* Now also test a huge value of uStartScan */
+    pbmi->bmiHeader.biHeight = LONG_MIN + 7;
+    SetLastError(0xdeadc0de);
+    ret = SetDIBitsToDevice(ghdcDIB32,
+                            0, // XDest,
+                            0, // YDest,
+                            2, // dwWidth,
+                            2, // dwHeight,
+                            0, // XSrc,
+                            0, // YSrc,
+                            abs(pbmi->bmiHeader.biHeight) - 3, // uStartScan,
+                            32, // cScanLines,
+                            aulBits, // lpvBits,
+                            pbmi,
+                            DIB_RGB_COLORS);
+    ok_dec(ret, 17);
+    ok_err(0xdeadc0de);
+
+    /* Test invalid bitmap info header */
     pbmi->bmiHeader.biSize = 0;
     SetLastError(0xdeadc0de);
     ret = SetDIBitsToDevice(ghdcDIB32,
@@ -359,12 +543,12 @@ Test_SetDIBitsToDevice()
                             DIB_RGB_COLORS);
 
     ok_dec(ret, 1);
-    ok_hex(pulDIB32Bits[0], 0x00000000);
-    ok_hex(pulDIB32Bits[1], 0x00000000);
+    todo_ros ok_hex(pulDIB32Bits[0], 0x00000000);
+    todo_ros ok_hex(pulDIB32Bits[1], 0x00000000);
     ok_hex(pulDIB32Bits[2], 0x00000000);
     ok_hex(pulDIB32Bits[3], 0x00000000);
-    ok_hex(pulDIB32Bits[4], 0x11000000);
-    ok_hex(pulDIB32Bits[5], 0x00000011);
+    todo_ros ok_hex(pulDIB32Bits[4], 0x11000000);
+    todo_ros ok_hex(pulDIB32Bits[5], 0x00000011);
     ok_hex(pulDIB32Bits[6], 0x00000000);
     ok_hex(pulDIB32Bits[7], 0x00000000);
 
@@ -384,12 +568,12 @@ Test_SetDIBitsToDevice()
                             DIB_RGB_COLORS);
 
     ok_dec(ret, 1);
-    ok_hex(pulDIB32Bits[0], 0x11000000);
-    ok_hex(pulDIB32Bits[1], 0x00000011);
+    todo_ros ok_hex(pulDIB32Bits[0], 0x11000000);
+    todo_ros ok_hex(pulDIB32Bits[1], 0x00000011);
     ok_hex(pulDIB32Bits[2], 0x00000000);
     ok_hex(pulDIB32Bits[3], 0x00000000);
-    ok_hex(pulDIB32Bits[4], 0x00000000);
-    ok_hex(pulDIB32Bits[5], 0x00000000);
+    todo_ros ok_hex(pulDIB32Bits[4], 0x00000000);
+    todo_ros ok_hex(pulDIB32Bits[5], 0x00000000);
     ok_hex(pulDIB32Bits[6], 0x00000000);
     ok_hex(pulDIB32Bits[7], 0x00000000);
 
@@ -465,12 +649,12 @@ Test_SetDIBitsToDevice()
                             DIB_RGB_COLORS);
 
     ok_dec(ret, 1);
-    ok_hex(pulDIB32Bits[0], 0x00000000);
-    ok_hex(pulDIB32Bits[1], 0x00000000);
+    todo_ros ok_hex(pulDIB32Bits[0], 0x00000000);
+    todo_ros ok_hex(pulDIB32Bits[1], 0x00000000);
     ok_hex(pulDIB32Bits[2], 0x00000000);
     ok_hex(pulDIB32Bits[3], 0x00000000);
-    ok_hex(pulDIB32Bits[4], 0x11000000);
-    ok_hex(pulDIB32Bits[5], 0x00000011);
+    todo_ros ok_hex(pulDIB32Bits[4], 0x11000000);
+    todo_ros ok_hex(pulDIB32Bits[5], 0x00000011);
     ok_hex(pulDIB32Bits[6], 0x00000000);
     ok_hex(pulDIB32Bits[7], 0x00000000);
 
@@ -490,12 +674,12 @@ Test_SetDIBitsToDevice()
                             DIB_RGB_COLORS);
 
     ok_dec(ret, 1);
-    ok_hex(pulDIB32Bits[0], 0x11000000);
-    ok_hex(pulDIB32Bits[1], 0x00000011);
+    todo_ros ok_hex(pulDIB32Bits[0], 0x11000000);
+    todo_ros ok_hex(pulDIB32Bits[1], 0x00000011);
     ok_hex(pulDIB32Bits[2], 0x00000000);
     ok_hex(pulDIB32Bits[3], 0x00000000);
-    ok_hex(pulDIB32Bits[4], 0x00000000);
-    ok_hex(pulDIB32Bits[5], 0x00000000);
+    todo_ros ok_hex(pulDIB32Bits[4], 0x00000000);
+    todo_ros ok_hex(pulDIB32Bits[5], 0x00000000);
     ok_hex(pulDIB32Bits[6], 0x00000000);
     ok_hex(pulDIB32Bits[7], 0x00000000);