Created
May 9, 2015 21:51
-
-
Save kumatti1/70421f8cfa7f95f13cb8 to your computer and use it in GitHub Desktop.
IWebBrowser_Navigate2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Declare PtrSafe _ | |
Function IWebBrowser_Navigate2 Lib "shlwapi.dll" Alias "#575" ( _ | |
ByVal IE As Object, _ | |
ByVal url As LongPtr, _ | |
ByVal Flags As LongPtr, _ | |
ByVal TargetFrameName As LongPtr, _ | |
ByVal PostData As LongPtr, _ | |
ByVal Headers As LongPtr _ | |
) As Long | |
Sub hoge() | |
Const url = "https://www.google.co.jp/?gws_rd=ssl" | |
Dim IE As Object | |
Set IE = CreateObject("Shell.Application").Windows.findwindowSW(url, Empty, 1, 0, 1) | |
If IE Is Nothing Then Exit Sub | |
Dim hr As Long | |
hr = IWebBrowser_Navigate2(IE, StrPtr("http://www.yahoo.co.jp/"), 0, 0, 0, 0) | |
Debug.Print Hex$(hr) | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment