Have a program that works fine in Windows 98. It bombs in windows XP.
I think my problem lies in my use of GetDC/ReleaseDC and handles.
Would it be possible to post the page from the latest SDK for GetDC that
recognizes windows XP. I'm thinking there might be a differance.
Posted on 2002-09-16 19:40:27 by shankle
You should check whether it's the bug in your own program that crashed it. Especially, check whether you saved values of registers such as esi, edi, ebx with in your program.
Posted on 2002-09-16 19:47:54 by Iczelion
you don't need anyone to post this page, it is already available on the net, right here. For all API doco, goto www.msdn.microsoft.com, and use the little searchbox in the top left corner.

After checking the link above, you will see that there has been no discernable change to this API call in XP, so it is likely that the bug is yours, probably exactly the bug Icz mentioned.
Posted on 2002-09-17 07:07:59 by sluggy
Thanks for the suggestions guys.
Posted on 2002-09-17 07:24:25 by shankle
I was under the impression that the following would save the registers
that Windows uses.

WNDPROC PROC uses esi edi ebp ebx, hWnd:HWND, iMsg:UINT,
wParam:WPARAM, lParam:LPARAM

Posted on 2002-09-17 15:54:23 by shankle
It does, if you check the compiled code you will see a bunch of pushes at the start of the function, and a bunch of pops just before each ret. I don't know if there is any need for you to save ebp unless you are actually using it in your code, i personally never save it (but i also never use it).

You have really given us no information to go on, which means we cannot give you an answer. What you need to do is whenever you call an API function, check the return code, if the return code indicates that there was an error then you need to call GetLastError to find out what the error was. Also, it would help if you posted the relevant section of code :)
Posted on 2002-09-17 19:31:04 by sluggy
The other thing to look for is the complement of preserving ESI, EDI, and EBX.

When calling API's, don't assume ECX and EDX will remain undisturbed.
Posted on 2002-09-17 23:20:12 by tenkey