[ros-kernel] Winzip almost loads - I need some help

Aleksey Bragin aleksey at studiocerebral.com
Mon Nov 24 09:05:59 CET 2003


Hi,
sorry for late reply, but I had the same error happened to my application
when I tried to run it under ROS. (CreateCompatibleDC with
PrimarySurfaceCreated FALSE).

This happens when I fill WNDCLASS structure w/o having created any window
yet.

And when I fill hCursor and hIcon fields, I call LoadCursor(hInst,
MAKEINTRESOURCE(IDC_CURSOR1)) and LoadIcon(hInst,
MAKEINTRESOURCE(IDB_ICON));


When I commented out this two lines (replaced with NULL's), these two errors
about CreateCompatibleDC have disappeared.


Hope this would be some help,
With the best regards,
Aleksey Bragin.

----- Original Message ----- 
From: "Ge van Geldorp" <ge at gse.nl>
To: "'ReactOS Kernel List'" <ros-kernel at reactos.com>
Sent: Friday, November 21, 2003 1:30 PM
Subject: RE: [ros-kernel] Winzip almost loads - I need some help


> I don't have the source present atm, but if I remember correctly the
> message about CreateCompatibleDC failing is given when the variable
> PrimarySurfaceCreated is FALSE. The PrimarySurface is initialized (and
> this var set to TRUE) when the first DC is created and it is closed down
> (var set to FALSE) when all DCs have been deleted. So what happens
> exactly on the screen? You see it switching to graphics mode I assume,
> then some drawing takes place, then it switches back to "blue screen"
> mode and you get the crash?
> My guess is the app does a GetDC() and doesn't hand it back with
> ReleaseDC() (which would put the DC in the cache but not delete it) but
> does a DeleteDC() on it. If it's the last (or only) DC this will force
> the system to switch back to blue screen mode.
>
> Another experiment: try renaming blue.sys to blue.sys.save and reboot.
> This would give you a cmd window in GUI mode which keeps open its own
> DCs. That should prevent the system from switching out of graphics mode.
>
> Ge van Geldorp.
>
> _______________________________________________
> Ros-kernel mailing list
> Ros-kernel at reactos.com
> http://reactos.geldorp.nl:8080/mailman/listinfo/ros-kernel



More information about the Ros-kernel mailing list