News:

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

module entry point as an argument?

Started by gavin, September 10, 2005, 04:16:31 PM

Previous topic - Next topic

gavin


.data

    messageboxtxt db 'Gavin is great',0
    messageboxcaption db 'win32asm',0

start:
   
    push [ebp+8]                         ;style argument i used the module entry point instead
    push offset messageboxcaption
    push offset messageboxtxt
    push 0                                   ;handle
    call MessageBox
   
    invoke ExitProcess,eax ;return to ntdll

end start     


When i run this i notice the full captions text is not displayed.
Any idea why?
Thanks

AeroASM

1. You need to put ".code" between "messageboxcaption" and "start:"

2. When I put in the missing .code, it worked perfectly on my computer (Windows XP Professional)

3. Why are you using the module entry point as a style argument? The problem may be that MessageBox is misinterpreting the style argument as a style that you do not want.

gavin

Hi Aeroasm.

Must of pasted it wrong sorry about the missing .code label.
I was just trying to understand as much as possible about how functions work using my debugger.
This is also on winxp and when the caption comes up it ooks like so win32....
I used the module entry point because i was messing around.
What exactly is the module entry point for ?
Thanks.

diablo2oo2

QuoteWhat exactly is the module entry point for

its the adress where your program start to run when you execute it. in your case at the "start:" label

gavin

Hi Diablo2oo2.
Thanks for that ,i understand now. :U