The MASM Forum
Microsoft 64 bit MASM => MASM64 SDK => Topic started by: hutch-- on December 10, 2019, 10:11:52 PM
-
Simple stuff but useful enough. I have added it to the library.
url "http://www.masm32.com/download/masm32v11r.zip
The MACRO
url MACRO quoted
rcall RunUrl,quoted
ENDM
The proc
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
RunUrl proc URLpath:QWORD
LOCAL pbuf :QWORD
LOCAL buff[512]:BYTE
mov pbuf, ptr$(buff)
mcat pbuf,"explorer.exe ",URLpath
rcall execute,pbuf
ret
RunUrl endp
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
-
Why not ShellExecute with "open" and the url?
Hard-coding "explorer.exe" is bad practice, no? i.e. is it the same name in different languages?
-
I am sure there are multiple ways of doing this, if I find a better way, I will try it but the procedure is basically to test the "execute" procedure which is just a wrapper for CreateProcess.
This works well.
invoke ShellExecute,0,"open","http://www.masm32.com/download/masm32v11r.zip",0,".",SW_SHOW