Information générale
Catégorie:
Fonctions Windows API
>>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
A part off the code is
I hope you can help me
DECLARE INTEGER InternetOpen ;
IN WININET.DLL ;
STRING,;
INTEGER,;
STRING, STRING, INTEGER
hInetConnection=;
InternetOpen("West Wind Web Connection " + WWVERSION,;
THIS.nHTTPConnectType,;
THIS.cHTTPProxyName,THIS.cHTTPProxyBypass,0)
*** THIS.nHTTPConnectType is 0 or 3
*** THIS.cHTTPProxyName = '172.16.0.100:8080'
*** I also tried this extra
*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)
*** If i place no user check on the proxy it works
oHTTP.setproxyuser(ALLTRIM(l_proxy_user),hInetConnection)
oHTTP.setproxypass(ALLTRIM(l_proxy_pass),hInetConnection)
IF hInetConnection = 0
THIS.nError=GetLastError()
THIS.cErrorMsg=THIS.GetSystemErrorMsg(THIS.nError)
RETURN THIS.nError
ENDIF
****
FUNCTION setproxyuser
LPARAMETERS luser,lInetConnection
DECLARE INTEGER InternetSetOption IN WinInet.dll ;
INTEGER hInternet, ;
INTEGER dwOption, ;
STRING @lpBuffer, ;
LONG @lpdwBufferLength
luser = luser +CHR(0)
nUser = len(luser)
IF PCOUNT()=2
llRetVal=InternetSetOption(lInetConnection,;
43,;
@luser,@nUser)
ELSE
llRetVal=InternetSetOption(THIS.hIPSession,;
43,;
@luser,@nUser)
ENDIF
wait window luser+STR(llRetVal)
return llRetVal
****
Function setproxypass
LPARAMETERS lPass,lInetConnection
DECLARE INTEGER InternetSetOption IN WinInet.dll ;
INTEGER hInternet, ;
INTEGER dwOption, ;
STRING @lpBuffer, ;
LONG @lpdwBufferLength
lpass = lpass+CHR(0)
npass = len(lPass)
IF PCOUNT()=2
llRetVal=InternetSetOption(lInetConnection,;
44,;
@lPass,@nPass)
ELSE
llRetVal=InternetSetOption(THIS.hIPSession,;
44,;
@lPass,@nPass)
ENDIF
wait window lpass+STR(llRetVal)
return llRetVal
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement