News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Can someone tell me why...

Started by Snouphruh, January 27, 2006, 06:08:07 AM

Previous topic - Next topic

Snouphruh

Hi, men!

I used MASM to create a small application. Everything was alright while I was running Windows XP.
But it seems to be a problem when I'm trying to run my application on Windows ME.
The application just makes Windows ME halt totally.

I attached source of my application. The code is small. It only creates a window with a button on it.
Please, tell me what is wrong there.

[attachment deleted by admin]

Petroizki

You use ebx at WndMainProc, without preserving it.

Snouphruh


Petroizki

The general rule is; that you can use eax, ecx and edx freely, but you must preserve all other registers. It's just a coincidence that it works in Windows XP, it probably doesn't use ebx for anything important when it calls your programs WndProc. But you should always preserve those other registers, even when making program for only to be run in XP. :wink

Snouphruh

I add preserving of ebx, esi and edi registers. The application runs successfully.
It's a very interesting thing! I use XP for about 3 years and there is no error I faced to.
But the last day when I tried my application on ME. I was surprised!
Now I know the cause of the error. Ok, I have noted it for further developments.
Thanx, man!

PS: maybe I'll help you too someday like you did me today.