A quick way to do this,is to use the IWebBrowser2 interface.You need just declarations to do that.
Here is a sample of used translated from the SDK.
Quote
;use exdisp.sdk (exdisp.h) in the "ready to used SDK",that all you need
;CreateBstr and FreeBSTR are in the WMI sample , but you can easily replace it
; invoke MultiByteToWideChar,CP_ACP,NULL,pChain,\
; -1,addr phrase,sizeof phrase
; invoke SysAllocString,addr phrase ;return the BSTR
;------------------- internet explorer --------------------------------------
;CLSID_InternetExplorer GUID <02DF01H,0H,0H,<0C0H,0H,0H,0H,0H,0H,0H,046H>>
;IID_IWebBrowser2 GUID <0D30C1661H,0CDAFH,011D0H,<08AH,03EH,0H,0C0H,04FH,0C9H,0E2H,06EH>>
;################################################################
ExplorerWeb PROC URL:DWORD ;pointer on a url in ANSI format
Local vEmpty:VARIANT
Local bstrURL:DWORD
Local retour:DWORD
ZEROLOCALES retour
invoke VariantInit, addr vEmpty
.if ppvIWebBrowser2 == 0
invoke CoCreateInstance,addr CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER,
addr IID_IWebBrowser2,addr ppvIWebBrowser2
.if eax != S_OK
jmp FindeExplorerWeb
.endif
.endif
invoke CreateBstr,URL
mov bstrURL,eax
IWebBrowser2 Navigate,bstrURL, addr vEmpty, addr vEmpty, addr vEmpty, addr vEmpty
.if eax >= 0 ;SUCCEED
IWebBrowser2 put_Visible,VARIANT_TRUE
mov retour,1
.else
IWebBrowser2 Quit
.endif
IWebBrowser2 Release
mov ppvIWebBrowser2,0
invoke FreeBSTR
FindeExplorerWeb:
mov eax,retour
ret
ExplorerWeb endp
;################################################################
I am having a hard time trying to compile this, could someone post a full example of how to use it?
Hello,
If you are not afraid with a little french,here is a fool sample,with all you need.
http://www.asmfr.com/codes/ATL-REUTILISER-INTERNET-EXPLORER-VISUALISER-PAGE-HTML_52619.aspx
There is a trick,the dll is used dynamicaly to avoid a download of the DDK.
The tool who made that can be found (with others) here:
http://www.masm32.com/board/index.php?topic=5428.0
Wait a minute,it seems i have been too fast
It's ok now,you have just to download it