x86 doesn't bother about misaligned data, unless you have some certain bits set in...
what is it... CR0 probably. or if you deal with SSE(2) native data types. it's good practice
to keep your aligned, though.

dunno about the problem with creating a snapshot of a supsended process. that might
be a genuine bug. dunno if psapi has the same problems.
Posted on 2003-01-23 10:07:57 by f0dder
well, i have now installed win2k; i gotta say its better, indeed. but i'm still not satisfied!
it's still the same with the ASM-progs. my mp3Player can be launched, but no window appears and it won't be listed in the tasklist. after shutting this prog down to a "minimalist"-debug-version i was able to make a window appear. but right after the window's displayed an error protocol is created and the task is killed. the only useful thing is the stack-backtrace. this one occurs in DefWindowProc - a funcion i dont call... it seems as i have to keep win98 - but i'll keep on trying.

greets, hartyl
Posted on 2003-01-23 13:01:56 by hartyl
I guess it's easier to blame microsoft than writing good code ^_^.
hartyl, do you preserve registers? do you call DefWindowProc (for
a regular window), or remember to to return 0 on unhandled messages
(dialog windows)?
Posted on 2003-01-23 13:14:22 by f0dder
i'll have to work some time on this one...
i'm used to work with win98 and SoftICE as debugger (great combiation!). but: i only preserved the registers, which are modified on Win98. it seems as if it was the error-source #1... btw, is any site out there, showing which registeres are preserved by the APIs? i'll try to work this out by reducing the code to the minimal increasing it back to the whole while searching for these nasty errors, but before i'll try to install SoftICE...
its also not easy to track down these errors: RADAsm does not work (due to the SAME error! - no valid win32 application!)!. so i goota assemble this one on another computer and lauch the prog on the win2k-computer...
it's curel, since it won't be the only asm-prog i'll ever write or i have written... all the others will remain with that error... i thought about a too high security-level, which looks if the program to be launched is too small or some things, dunno... i'd say security at last - i've never needed it (thats why i like win98).

greets, hartyl
Posted on 2003-01-23 13:25:17 by hartyl
always preserve (if used) ebx,esi,edi,ebp,esp in your callbacks. always assume that
an API function will trash eax,ecx,edx. also, always leave direction flag clear before calling APIs.
Posted on 2003-01-23 13:34:05 by f0dder
And always leave direction flag cleared before returning from a callback.
Posted on 2003-01-23 22:22:45 by tenkey
f0dder wrote:
> I guess it's easier to blame microsoft than writing good code

Yes of course it is easier. :grin:
But when problems arise even when our code is good, it's really
You're still invited to find the 'bad code' in my code example above.
Simple and correct (IMHO), but not working.

aweX <-
Posted on 2003-01-24 04:24:09 by aweX
AweX, I might have a look at your code snippet when I get back from work.
Haven't looked at it yet, so I dunno if it's your fault or not. I do have the
standpoint that it's normally not a problem with the API...
Posted on 2003-01-24 05:47:39 by f0dder
oh, man! adding some pushad and popad solved very much. but tracking down every error and presaving-issue is quite difficult and ... boring? hmm... somewhen i'm sure i'll be done,
but: i wanted to look whether i can play music or not... i use MCI for playing (i dunno myself how this one's doing...) - but it doesn't play music! such difficult problems... an mp3Player, which doesn't play music... "invalid" win32-apps... has nobody of you the same problems? using win2k and trying to code asm? or do you and dont have this problem? so, why dont you have it? :) i'm getting really stuck with it...

greets, hartyl
Posted on 2003-01-24 13:34:22 by hartyl
never had any problems coding for win2k (well, perhaps a few initial probs, but that got solved very quickly), neither in asm nor C. I play by the rules ;)
Posted on 2003-01-24 13:37:12 by f0dder
Never had a problem of coding on win2k. :stupid:
Posted on 2003-01-25 02:49:18 by roticv
nah! the world is cruel!
i've now copied my IDE (RADAsm) on the win2k system. after updating it to v2.0 i could start it without the "not a valid win32-application". i thought, that i could now easily figure out whats wrong, but when assembling the assembler comes with the same error!! argh!
might a service-pack cheer me up? i checked, that there are three of them. do i have to install one after the other? does the last contain all the others?
finally i want to have a conforatble debugger. SoftICE didn't display its window, but it broke on breakpoints and so on. after selecting another display driver i smashed my system. i think i hang it on a nail and give it up...
i've even searched the web for this error. no really matching results...

greets, hartyl
Posted on 2003-01-25 13:33:12 by hartyl