flat assembler
Message board for the users of flat assembler.
Index
> Windows > GetCommandLine & ShellExecute Goto page Previous 1, 2 |
Author |
|
MHajduk 27 Aug 2010, 18:48
I'm glad to hear that.
|
|||
27 Aug 2010, 18:48 |
|
semiono 24 Oct 2010, 20:11
Code: include '%fasm%\win32ax.inc' section '.code' executable start: invoke GetCommandLine mov [ebx],eax invoke GetModuleFileName,NULL,lpFile,MAX_PATH invoke lstrlen,lpFile sub [ebx],eax cmp byte [ebx],' ' jne @f inc ebx cmp byte [ebx],'h' jne @f invoke TileWindows,NULL,MDITILE_HORIZONTAL,NULL,NULL,NULL jmp exit @@: invoke TileWindows,NULL,MDITILE_VERTICAL,NULL,NULL,NULL exit: invoke ExitProcess,NULL .end start section '.data' readable writable lpFile rb MAX_PATH Where is the problem? | Always jne @f |
|||
24 Oct 2010, 20:11 |
|
baldr 25 Oct 2010, 05:26
semiono,
You didn't initialize ebx, it's dangerous. Executable name in command line can be enclosed in doublequotes. Module file name isn't. |
|||
25 Oct 2010, 05:26 |
|
semiono 25 Oct 2010, 20:41
Code: include '%fasm%\win32ax.inc' section '.code' executable start: invoke GetCommandLine mov ebx,eax @@: cmp byte [ebx],NULL je exec cmp byte [ebx],'h' je @f cmp byte [ebx],'H' je @f inc ebx jmp @r @@: inc ebx cmp byte [ebx],' ' je @r invoke TileWindows,NULL,MDITILE_HORIZONTAL,NULL,NULL,NULL jmp exit exec: invoke TileWindows,NULL,MDITILE_VERTICAL,NULL,NULL,NULL exit: invoke ExitProcess,NULL .end start MB_OK |
|||
25 Oct 2010, 20:41 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.