General information
Category:
Windows API functions
>>>>Thanks for your reply.
>>>>
>>>>I tried al lot off possibilities but is is still not working
>>>>I work without the proxy. But not with the password autorisation
>>>>
>>>
>>>Can you describe how you implemented this, and what is happening?
>>
>
>>I use WWIpstuff and changed the code
>
>What happens?
I send you some code
DECLARE INTEGER GetLastError;
IN WIN32API
DECLARE INTEGER InternetOpen ;
IN WININET.DLL ;
STRING,;
INTEGER,;
STRING, STRING, INTEGER
THIS.nHTTPConnectType = 3
THIS.cHTTPProxyName = "171.16.0.100:8080"
THIS.cHTTPProxyBypass = .NULL.
hInetConnection=;
InternetOpen("Mozilla/3.0",;
THIS.nHTTPConnectType,;
THIS.cHTTPProxyName,THIS.cHTTPProxyBypass,0)
IF hInetConnection = 0
THIS.nError=GetLastError()
THIS.cErrorMsg=THIS.GetSystemErrorMsg(THIS.nError)
RETURN THIS.nError
ENDIF
THIS.hIPSession=hInetConnection
*!* Not used
*!* DECLARE INTEGER InternetQueryOption IN WinInet.dll ;
*!* INTEGER hInternet, ;
*!* INTEGER dwOption, ;
*!* STRING @lpBuffer, ;
*!* LONG @lpdwBufferLength
*!* lcBuffer = SPACE(1024)
*!* lnBufferLen = 1024
*!* INTERNET_OPTION_PROXY = 38
*!* lnSuccess = InternetQueryOption(hInetConnection, INTERNET_OPTION_PROXY, *!* @lcBuffer, @lnBufferLen)
DECLARE INTEGER InternetSetOption IN WinInet.dll ;
INTEGER hInternet, ;
INTEGER dwOption, ;
STRING @lpBuffer, ;
LONG @lpdwBufferLength
INTERNET_OPTION_PROXY_USERNAME = 43
INTERNET_OPTION_PROXY_PASSWORD = 44
IF TYPE("l_proxy_user")="C"
IF !EMPTY(l_proxy_user)
lpBuffer = alltrim(l_proxy_user) + CHR(0)
lpdwBufferLength = LEN(lpBuffer)
dwOption = INTERNET_OPTION_PROXY_USERNAME
nSuccess = InternetSetOption(hInetConnection,dwOption,;
@lpBuffer, @lpdwBufferLength)
IF nSuccess <> 1
nError = GetLastError()
MESSAGEBOX("Could not set the proxy username. " + ;
"The following error was returned: " +;
CHR(13) + CHR(13) + ;
THIS.GetSystemErrorMsg(nError), 48, "")
*** Get the message
*** Win 32 API Parameter is incorrect
ENDIF
ENDIF
ENDIF
IF TYPE("l_proxy_pass")="C"
IF !EMPTY(l_proxy_pass)
lpBuffer = alltrim(l_proxy_pass) + CHR(0)
lpdwBufferLength = LEN(lpBuffer)
dwOption = INTERNET_OPTION_PROXY_PASSWORD
nSuccess = InternetSetOption(hInetConnection, dwOption,;
@lpBuffer, @lpdwBufferLength)
IF nSuccess <> 1
nError = GetLastError()
MESSAGEBOX("Could not set the proxy password. " + ;
"The following error was returned: " +;
CHR(13) + CHR(13) + ;
THIS.GetSystemErrorMsg(nError), 48, "")
*** Get the message
*** Win 32 API Parameter is incorrect
ENDIF
ENDIF
ENDIF
THIS.WinInetSetTimeout()
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only