News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Giving a program arguments over the command line

Started by PatrickDS, July 17, 2020, 05:54:24 AM

Previous topic - Next topic

PatrickDS

I did loads of research on this topic but never found anything that matches my problem.
I want to write a program that can be started over the windows command line like this:

program.exe "a string as input"


The program then uses the string to do some stuff with it and should output just one line of text.

Example:

>program.exe "a string as input"
output
>


It should not open its own window!
It would be awesome if somebody could show me how to do that. Thank you! :biggrin:
I also wanted to thank you for your warm welcome in this forum!  :smiley:

jj2007

include \masm32\include\masm32rt.inc
.code
start:
  print cmd$(1)
  exit
end start

Vortex

Hello,

You can study the following functions, they are the members of masm32.lib :

\masm32\help\masm32.chm -> Command Line Procedures

Command Line Procedures

ArgCL
ArgClC
GetCL
getcl_ex

PatrickDS


jj2007