I have these lines in my program: szText urlBuffer,"http://yahoo.com",0 "Just example" szText Open1,"open",0 invoke ShellExecute, hWin, addr Open1, ADDR urlBuffer,NULL ,NULL, SW_SHOWMAXIMIZED The browser open but does nothing. It does not load the url. If the browser is already open, it just does nothing. I run ie5.5 What I my doing wrong? Thanks Guy
hi, try this:
This message was edited by drcmda, on 3/5/2001 7:04:12 PM
.386 .model flat, stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\shell32.inc includelib \masm32\lib\shell32.lib includelib \masm32\lib\kernel32.lib .data urlBuffer db "http://www.google.com",0 .code start: invoke ShellExecute, NULL,NULL, ADDR urlBuffer,NULL ,NULL, SW_SHOWMAXIMIZED invoke ExitProcess,NULL end start
I tried but it's still doen't work.
I don't suppose it helps much, but I tried the above code and it worked just fine for me. umbongo
Hi, try this, it should work !! ; By The Angel Of Assembler 2001 :-) ; ; Ciao .486 locals jumps .model flat,stdcall extrn ShellExecuteA :Proc .data URL db "http://www.yahoo.com" .code entry: call ShellExecuteA, 0, 0, offset URL, 0, 0, 0 sub eax, eax ret end entry
@tramp32 hi, i did not tryed out your snippet but are you sure that a simple ret will exit a program? as far as i know the program is called from the kernel, that means that the return value of the kernel-base (or above) is in the stack. ret will pop that value and jump to it... for now i thought is is not possible to do a simple jump to that point (protected memory?). if your method is working then it would be good for virus like programs or mem-patching but why do you want to exit a "normal" windows prog like this if you have apis that are 100% compatible and 100% reliable?
drcmda's code work well..