
My second question is I have to load the Winhttp.dll but not the Wininet.dll my assumption is that something else loaded the Wininet.dll? Also I can use the Func_ method to call the Wininet.dll but have to use the CallFucntion method for the Winhttp.dll.
Is there a way to call the Winhttp.dll. via the Func_ method?
Hope you can follow my ramblings and can offer some insight.
Thanks,
Jeff
Code: Select all
;Requires Winhttp.dll & Wininet.dll
#INTERNET_OPEN_TYPE_DIRECT = $1
;
#WINHTTP_ACCESS_TYPE_NO_PROXY = $1
#WINHTTP_NO_PROXY_NAME = #Null
#WINHTTP_NO_PROXY_BYPASS = #Null
#WINHTTP_FLAG_ASYNC = $10000000
Procedure doPost()
; Example 1 requires Winhttp.dll)
winHTTPlib.l = OpenLibrary(#PB_Any,"Winhttp.dll")
Debug IsLibrary(winHTTPlib)
;WinHttpOpenHandle.l = WinHttpOpen_("User Agent",#WINHTTP_ACCESS_TYPE_NO_PROXY,#WINHTTP_NO_PROXY_NAME.,#WINHTTP_NO_PROXY_BYPASS,#WINHTTP_FLAG_ASYNC)
WinHttpOpenHandle.l = CallFunction(winHTTPlib,"WinHttpOpen","User Agent",#WINHTTP_ACCESS_TYPE_NO_PROXY,#WINHTTP_NO_PROXY_NAME,#WINHTTP_NO_PROXY_BYPASS,0)
Debug WinHttpOpenHandle
CloseLibrary(winHTTPlib)
;
; Example 2 requires Wininet.dll
internetOpenHandle.l = InternetOpen_("User Agent Info Goes Here",#INTERNET_OPEN_TYPE_DIRECT,"","",0)
Debug internetOpenHandle
InternetCloseHandle_(internetOpenHandle)
;
EndProcedure
doPost()