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
Posted on 2001-03-05 18:26:00 by Guy
hi, try this:

.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

urlBuffer db "http://www.google.com",0

invoke ShellExecute, NULL,NULL, ADDR urlBuffer,NULL ,NULL, SW_SHOWMAXIMIZED 
invoke ExitProcess,NULL  
end start
This message was edited by drcmda, on 3/5/2001 7:04:12 PM
Posted on 2001-03-05 19:01:00 by drcmda
I tried but it's still doen't work.
Posted on 2001-03-06 08:24:00 by Guy
I don't suppose it helps much, but I tried the above code and it worked just fine for me. umbongo
Posted on 2001-03-06 08:41:00 by 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
Posted on 2001-03-07 16:49:00 by TheTramp32
@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?
Posted on 2001-03-07 21:15:00 by drcmda
drcmda's code work well..
Posted on 2001-03-08 06:39:00 by c][obo