Using GDI and DirectX to get around the problem of Colour space conversion I have had just pain.
One machine I got make DDraw32.dll crash a couple of times and the code works fine and on anouther I get "Invalid DC" passed back, followed by GDI.EXE and Explorer.exe dieing and having to reboot.
Here's an example of what I have coded.
if( lpdds->GetDC( &hdc ) == DD_OK )
if( hdc != NULL )
cImageClass->CopyToDC( hdc );
MessageBox( NULL, "Invalid DC", "FATAL ERROR", MB_OK );
ReleaseDC( hdc );
MessageBox( NULL, "Unable to obtain HDC", "ERROR", MB_OK );
The odd thing is that GetDC returned DD_OK when it fails?
Hope someone can help.