Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: wwhttp error

$
0
0
Re: wwhttp error
West Wind Client Tools
Re: wwhttp error
06/19/2012
02:59:24 PM
3J30W4RAR Show this entire thread in new window
Gratar Image based on email address
From:
Rick Strahl
To:
Sam 
Attachments:
None
Sam,

You can set the timeout via the nConnectTimeout property, rather than calling WinInetSetTimeout() property.

LOCAL oHttp as wwHttp oHttp = Create('wwHttp') oHttp.nConnectTimeout = 10 oHttp.nHTTPConnectType=1 && 3 oHttp.nhttppostmode=1


The problem is that most of WinInet settings are applied after connection, and the various API calls are initialized only after the Connect method is fired. In fact calling the method before there is a connect handle has no effect so this wouldn't work anyway.

The method originates from older days (and is now used internally) when we used HttpGetEx() with explicit HttpConnect() calls. HttpGet() does all this internally and nConnectTimeout calls WinInetSetTimeout() internally.

Hope this helps,

+++ Rick ---



Hi Rick

It seems setting the oHttp.wininetsettimeout(15) was causing the crash, it is working fine now.

Thanks

Sam

oHttp = Create('wwHttp') *!* oHttp.wininetsettimeout(15) oHttp.nHTTPConnectType=1 && 3 oHttp.nhttppostmode=1


Hi Sam,

What is the exact error and where does it occur?

InternetSetOption is a Windows API call so it should work unless there's any code that's calling CLEAR DLLS somewhere in your code...

+++ Rick ---



Hi Rick

After downloading the shareware client tools 5.62 .I am getting an error
File internetsetoption.prg does not exit
lRetVal=InternetSetOption(lnHandle,INTERNET_OPTION_CONNECT_TIMEOUT,@dwTimeoutSecs,4)

The old copy of wwhttp did not contain Addheader Function but worked for longest time.

I removed all the old programs now looking forward to upgrade .

Thanks

Sam






Viewing all articles
Browse latest Browse all 10393

Trending Articles