Alright I'm having some trouble with this..

1: could someone explain or post source code (for MASM) that would allow me to take whatever is in the commandline of my program, and then show it on a message box.. Example: I type, blah.exe BLAHBLAHBLAH and my program (blah.exe) loads and displays "BLAHBLAHBLAH in a message box...

2: Im trying to create a dll that i can use form C++ or VB, I made on and it worx perfectly from VB, then I changed to code, so I could pass it a string, and it would display the string in a message box, for example, the procedure was "ShowThisString(text as string)"

Then I would call it, ShowThisString "BlahBlahBlah"... ShowThisString would be the procedure from the ASM DLL, and it should display "BLAHBLAHBLAH" in a message box.. how would i go about doing that??

both questions are similar in that, I supply my program a string for an outside place, like commandline or VB/VC++, and i want it to be able to display that string (or value) in a message box or a window or whatever...

Please HELP! Thanks in advance for reading this post and considering to help me out...
Posted on 2001-10-27 18:52:08 by Falcon

There are 3 functions in the MASM32 library that retreive different arguments from the command line, They are documented in the MASM332 library help file.

Posted on 2001-10-28 06:08:55 by hutch--
Thanks Hutch, I'm going to look at it... As far as #2 goes, I figured it out, and will be posting a example pretty soon..
Posted on 2001-10-28 10:33:33 by Falcon
Can you post the example please ? I want to know too, learning myself :p
Posted on 2002-01-23 20:54:18 by prana
Sure.. I think i posted it here somewhere.. i've reformated.. but i think i can find it somewhere on this forum or on another asm forum, but when i do.. i'll post it (probably today)
Posted on 2002-01-27 16:50:19 by Falcon
actually I went onto #win32Asm (Thanx guys !) and they lead me to the way and I played around and it worked great.

here is the code

.model flat,stdcall
option casemap:none

include \masm32\include\
include \masm32\include\
include \masm32\include\
include \masm32\include\
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\MASM32.lib


MsgBoxCaption db "Iczelion Tutorial No.2",0

Msg db 128 dup (?)
db 0

invoke ArgClC, 1, ADDR Msg ; Get Command line Arguments, 1 is the argument number, MSG is the Buffer
invoke MessageBox, NULL, addr Msg, addr MsgBoxCaption, MB_OK
invoke ExitProcess, NULL
end start

The bold bits are the secret MASM32 cheats way of doing it :D hehehe I am just a newby and I twisted Iczellions tutorial abit to learn so ... :)
Posted on 2002-01-28 23:44:03 by prana