最新消息:

使用ie尝试打开一个url

nsis 永恒心锁 1400浏览 0评论
#使用ie尝试打开一个url
!include "LogicLib.nsh"
SetCompressor /SOLID lzma
SetCompress force
XPStyle on
OutFile "Test.exe"
!define VARIANT_TRUE -1
!define VT_ERROR 10
!define DISP_E_PARAMNOTFOUND 0x80020004
!define CLSCTX_LOCAL_SERVER 0x4
!define CLSID_InternetExplorer {0002DF01-0000-0000-C000-000000000046}
!define IID_IWebBrowserApp {0002DF05-0000-0000-C000-000000000046}
!define IWebBrowserApp.Navigate ->11(i,i,i,i,i)i
!define IWebBrowserApp.put_Visible ->41(&i2)i
Function InternetExplorerAuto_OpenURL
exch $2
push $0
push $1
System::Call "ole32::CoCreateInstance(
g '${CLSID_InternetExplorer}', i 0,
i ${CLSCTX_LOCAL_SERVER},
g '${IID_IWebBrowserApp}', *i 0 r0)"
${If} $0 <> 0
System::Call "$0${IWebBrowserApp.put_Visible} (${VARIANT_TRUE}).r1"
${If} $1 = 0
System::Call "*(i ${VT_ERROR},i ${DISP_E_PARAMNOTFOUND},i)i.r1"
System::Call 'Oleaut32::SysAllocString(w "$2")i.r2'
System::Call "$0${IWebBrowserApp.Navigate} ($2,$1,$1,$1,$1)"
System::Free $1
System::Call 'Oleaut32::SysFreeString(ir2)'
${EndIf}
System::Call "$0->2()"
${EndIf}
pop $1
pop $0
pop $2
FunctionEnd
section
push "http://WWW.yhxs3344.net"
call InternetExplorerAuto_OpenURL
sectionend
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 使用ie尝试打开一个url

您必须 登录 才能发表评论!