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:
include \masm32\include\masm32rt.inc
.code
start:
print cmd$(1)
exit
end start
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
Thank you! :thup:
There is an interesting Windows API function, too: CommandLineToArgvW (https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw)