GetDC Returns Zero 
Author Message
 GetDC Returns Zero

I am having a terrible time trying to figure out a
problem I am having with the GetDC method failing and
returning zero. The platform is a P4 1.6Ghz with 256Mb
RAM, Win2k Pro, and DX9 Installed using the DX7 type lib.

I created a 320x240 work surface to prep my video and
overlays then I Blt it to one of 16 windows on the
screen. Everything works great except if I terminate the
app abnormally (ie: Hit Reset). Then, the app will fail
with GetDC returning zero for my work surface. It refuses
to work no matter how many time I reboot. DxDiag reports
everything is ok. I checked swap file and registry sizes.

I got it to work again last time by running windows
update and installing some security patches but they were
totally un-related to DirectX or GDI.

I figure its got be something messed up in the registry
but I can't put my finger on it. Anyone else seen this
problem?

Regards
Vince



Sat, 09 Jul 2005 22:11:58 GMT  
 GetDC Returns Zero

Correction...I just have to reboot the machine. It
doesn't have to be an abnormal program termination for
this to happen. Now I am at a complete loss.

Vince

Quote:
>-----Original Message-----
>I am having a terrible time trying to figure out a
>problem I am having with the GetDC method failing and
>returning zero. The platform is a P4 1.6Ghz with 256Mb
>RAM, Win2k Pro, and DX9 Installed using the DX7 type lib.

>I created a 320x240 work surface to prep my video and
>overlays then I Blt it to one of 16 windows on the
>screen. Everything works great except if I terminate the
>app abnormally (ie: Hit Reset). Then, the app will fail
>with GetDC returning zero for my work surface. It
refuses
>to work no matter how many time I reboot. DxDiag reports
>everything is ok. I checked swap file and registry sizes.

>I got it to work again last time by running windows
>update and installing some security patches but they
were
>totally un-related to DirectX or GDI.

>I figure its got be something messed up in the registry
>but I can't put my finger on it. Anyone else seen this
>problem?

>Regards
>Vince

>.



Sat, 09 Jul 2005 23:02:33 GMT  
 GetDC Returns Zero

GetDC/ReleaseDC paired ? It's really strange IMO it doesn't work on new
surfaces. Looks like a DDHelp problem. You could see if it still there once
your app is finished and see perhaps if "killhelp.exe" solves the problem.
It would be probably then something wrong when terminating the app...

Good luck.

Patrice



Quote:
> I am having a terrible time trying to figure out a
> problem I am having with the GetDC method failing and
> returning zero. The platform is a P4 1.6Ghz with 256Mb
> RAM, Win2k Pro, and DX9 Installed using the DX7 type lib.

> I created a 320x240 work surface to prep my video and
> overlays then I Blt it to one of 16 windows on the
> screen. Everything works great except if I terminate the
> app abnormally (ie: Hit Reset). Then, the app will fail
> with GetDC returning zero for my work surface. It refuses
> to work no matter how many time I reboot. DxDiag reports
> everything is ok. I checked swap file and registry sizes.

> I got it to work again last time by running windows
> update and installing some security patches but they were
> totally un-related to DirectX or GDI.

> I figure its got be something messed up in the registry
> but I can't put my finger on it. Anyone else seen this
> problem?

> Regards
> Vince



Sat, 09 Jul 2005 23:18:03 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Replace Function returns Nothing instead of Zero-length string

2. CreateProcess returning a value of zero

3. Microsoft Outlook Express 5 and Netscape, the AttachmentCount property always returns zero

4. Mid returning Zero Length String - sort of

5. Text field in Excel returns null when led by a zero

6. Oracle Returns Zero (0) USing ADO

7. Jet OleDB: Allow zero Length property returns True

8. -Text field in Excel returns null when led by a zero

9. Text field in Excel returns null when led by a zero

10. ADO calculations returning zero

11. GetActivewindow returns zero handle

12. GetComputerName returns zero length string

 

 
Powered by phpBB® Forum Software