Hello,

I have a console app which sets cooperative level "exclusive" + "fullscreen" then sets the display mode and then creates surfaces. This works if the app is running in a window, but if the app is running in fullscreen text mode, CreateSurface() fails (error 88760233). How could I get rid of this error (without changing the app to GUI type or switching to the windows screen).

Regards

Japheth
Posted on 2005-09-24 13:44:40 by japheth
you can only createsurface on a window not a console
Posted on 2005-09-24 18:34:27 by Qages
HRESULT: 0x88760233 (2289435187)
Name: DDERR_NODIRECTDRAWHW
Description: A hardware only DirectDraw object creation was attempted but the driver did not support any hardware.
Severity code: Failed
Facility Code: Unknown (2166)
Error Code: 0x0233 (563)

Don't be confused by this description. Qages is probably right and this description proves it (just think about it ;) ).

...I've seen more confusing DX error descriptions than this one :P
Posted on 2005-09-24 19:06:49 by ti_mo_n
btw, HRESULTs are easy to track (as designed)
error = (Is_Failure<<31) | (Facility_Code<<16) | Error_Number;
Is_Failure : 1-bit
Facility_Code : 15-bit
Error_Number : 16-bit

Facility_Code is unique for MS libraries, in this case we have 2166 (0x876), which is DirectDraw.
Posted on 2005-09-24 21:45:47 by Ultrano

Ok, thanks! The problem can be avoided by displaying a dummy window (with size 0,0) before DirectDraw is initialized. This apparently switches away from the fullscreen text console.

But when the app terminates, I would like to reactivate the console from where I was started. How could this be achieved?
Posted on 2005-09-24 23:08:26 by japheth