flat assembler
Message board for the users of flat assembler.

Index > Windows > Trouble writing my first assembly program.

Author
Thread Post new topic Reply to topic
AzraelUK



Joined: 23 Nov 2008
Posts: 3
AzraelUK 23 Nov 2008, 12:43
I'm trying to get a dialog box to pop up. It works if I do 'invoke MessageBox, HWND_DESKTOP, "Contents", "Title", MB_ICONERROR' then it works. If, however, I define the contents and title in the .data section, it doesn't work. Here's a summary of what I'm trying to do, with the useless parts snipped out:
Code:
.data
szTitle db 'Title goes here!',0
szContents db 'Contents go here!',0

.code
    invoke MessageBox, HWND_DESKTOP, szContents, szTitle, MB_ICONERROR
    
Post 23 Nov 2008, 12:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20333
Location: In your JS exploiting you and your system
revolution 23 Nov 2008, 12:52
wrote:
... with the useless parts snipped out
We don't encourage that here as it often turns out that the "useless parts" are the parts causing the problem. Indeed your code posted above looks perfectly fine for what it is. So perhaps I can suggest that you post the "useless parts" also?
Post 23 Nov 2008, 12:52
View user's profile Send private message Visit poster's website Reply with quote
AzraelUK



Joined: 23 Nov 2008
Posts: 3
AzraelUK 23 Nov 2008, 21:14
Never mind, I got it working (though I'm still not sure what was wrong or what I changed).
Post 23 Nov 2008, 21:14
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.