I just learned that I don't quite understand the function of getcommandline, so I searched for it online and made a note, which is not necessarily accurate. I hope you can give me some advice.
Win32 executableProgramThere are two types: console-based and Windows-based. The portal function of the console program is a traditional main function, while the window function is winmain. One major difference between these two entry functions is the processing of command line parameters. The prototype of the winmain function is:
IntWinapi winmain (hinstance, hinstance hprevinstance, lpstr lpcmdline,IntNshowcmd)
Window applications require support from command line parameters, that is, the third parameter of the winmain function. For example, when we open a TXT file, we can use notepad.exe c: \ abc.txt, in this case, c: \ abc.txtindicates a command line, and the command line prompts the application notepad.exe: the file to be opened is the file path in this example.
The getcommandline function is used to obtain the command line parameters of the program and pass them to the winmain function as parameters.
Invoke getcommandline;
MoV CommandLine, eax