Ajm wrote:Would it be possible to add manual proxy settings to the update tool.
Since updating my PC at work to XP pro SP2 from SP1 then tool does not connect to the internet through our ISA server.
Do you use the setting 'Use registry configuration' ?
With this setting it uses InternetOpen_() with #INTERNET_OPEN_TYPE_PRECONFIG.
It's the only solution that works for me at work ; I am also behind a corporate firewall / proxy (MS ISA server) and none of the codes I found on the forum with manual proxy settings ever worked for me, probably because of an authentication problem (NTLM stuff ??).
The new PB4.20 HTTP library doesn't work either.
The code I use looks like this :
Code: Select all
InitNetwork()
Url$ = "http://freenet-homepage.de/gnozal/PureFORM.zip"
;
; ///////////////////
Port = 80
Login.s = ""
Password.s = ""
; ////////////////////
;
hInet = InternetOpen_("MyTest/1.0",0,0,0,0) ; #INTERNET_OPEN_TYPE_PRECONFIG = 0 ; use registry configuration
If hInet
hURL = InternetOpenUrl_(hInet,Url$,0,0,$80000000,0) ; #INTERNET_FLAG_RELOAD = $80000000
If hURL
Domain$ = StringField(Url$,3,"/")
hInetCon = InternetConnect_(hInet,Domain$,Port,Login,Password,3,0,0) ; 3 = HTTP
If hInetCon
hHttpOpenRequest = HttpOpenRequest_(hInetCon,"HEAD",ReplaceString(Url$,"http://"+Domain$+"/",""),#Null,#Null,0,$80000000,0)
If hHttpOpenRequest
iretval = HttpSendRequest_(hHttpOpenRequest,#Null,0,0,0)
If iretval
BufferLength = 2048 : Buffer$ = Space(BufferLength)
HttpQueryInfo_(hHttpOpenRequest,19,@Buffer$,@BufferLength,0)
String$ = PeekS(@Buffer$,BufferLength)
String$ = Trim(String$)
If String$ = "200"
BufferLength = 2048 : Buffer$ = Space(BufferLength)
HttpQueryInfo_(hHttpOpenRequest,22,@Buffer$,@BufferLength,0)
String$ = PeekS(@Buffer$,BufferLength)
MessageRequester("API", String$) ; <------ if it works, you should see a message requester
EndIf
EndIf
EndIf
InternetCloseHandle_(hInetCon)
EndIf
InternetCloseHandle_(hURL)
EndIf
InternetCloseHandle_(hInet)
EndIf