[ros-dev] The ABCs of DCEs

James Tabor jimtabor.rosdev at gmail.com
Sat Jul 5 07:14:44 CEST 2008


Hi,
Here is a patch that works with XP. It does reveal something very interesting.
Enjoy!
James


Index: dce.c
===================================================================
RCS file: /home/wine/wine/dlls/user32/tests/dce.c,v
retrieving revision 1.4
diff -u -r1.4 dce.c
--- dce.c       25 Feb 2008 20:22:42 -0000      1.4
+++ dce.c       5 Jul 2008 05:09:54 -0000
@@ -73,11 +73,20 @@
     ok( rop == def_rop || rop == R2_WHITE, "wrong ROP2 %d after
release\n", rop );
     ReleaseDC( hwnd_cache, hdc );

+    old_hdc = hdc;
     hdc = GetDCEx( hwnd_cache, 0, DCX_USESTYLE );
     rop = GetROP2( hdc );
+    ok( old_hdc != hdc, "did get same DC %p/%p\n", old_hdc, hdc );
     ok( rop == def_rop, "wrong ROP2 %d after release\n", rop );
     ReleaseDC( hwnd_cache, hdc );

+    hdc = GetDCEx( hwnd_cache, 0, DCX_USESTYLE | DCX_NORESETATTRS );
+    rop = GetROP2( hdc );
+    ok( old_hdc == hdc, "didn't get same DC %p/%p\n", old_hdc, hdc );
+    ok( rop == def_rop || rop == R2_WHITE, "wrong ROP2 %d after
release\n", rop );
+    ReleaseDC( hwnd_cache, hdc );
+
+
     /* test own DC */

     hdc = GetDC( hwnd_owndc );


More information about the Ros-dev mailing list