Ok, I'm trying desperately to get my program working under w2k (no problems in w9x) I've managed to find where it's doing a GPF, and it's _INSIDE_ a "CreateWindowEx" !!! anyone got _any_ idea's, clues, suggestions, w2k infos, spare brains for my poor broken one thanks Clive
Posted on 2001-02-13 02:51:00 by Entro-P
Check your WM_CREATE code whether it preserves the values of esi/edi/ebx.
Posted on 2001-02-13 03:45:00 by Iczelion
*YAY* thanks icz :) btw, are there any other w2k / nt funnies like that, where can i find a list of reg preservation per api call etc thanks again
Posted on 2001-02-13 05:21:00 by Entro-P
The registers you must preserve in a callback function are edi, esi, ebx and possibly ebp. Win2k/NT is the superior platform for software development. period. It is the full implementation of win32 apis and follows the rules *STRICTLY*, not like those win9x which must relax somewhat on the rule enforcement. Under win2k/NT, you also should initialize the structure you are going to use to zeroes first. Some uninitialized members can wreak havoc on your win2k/Nt system while they are blissfully ignored on win9x. This message was edited by Iczelion, on 2/13/2001 5:35:30 AM
Posted on 2001-02-13 05:34:00 by Iczelion
one more question : (btw putting in a "uses esi edi ebx" in all my wndrpocs worked perfectly :) ) here's a snippet of code that's still causing a crash .. INVOKE GetWindowLong, hRebar, GWL_WNDPROC mov OldProc_Rebar, eax INVOKE SetWindowLong, hRebar, GWL_WNDPROC, ADDR Proc_NewReBar i'm subclassing a bit later than at startup, this works fine in win9x but not 2k :/ any ideas ?
Posted on 2001-02-13 06:54:00 by Entro-P
egads, ignore previous quesion. I found that putting a "ret" at the end of a proc might help *ehe*
Posted on 2001-02-13 08:09:00 by Entro-P