I could still use a little help with this one. I need to know if a workstation is connected to the web, and I am testing code like (which came from a prior thread a few months back):
LPARAMETERS lcWebAddress
DECLARE INTEGER InternetCheckConnection IN Wininet.DLL STRING Url, LONG dwFlags, LONG Reserved
IF InternetCheckConnection(lcWebAddress, 1, 0) != 0
RETURN .T.
ELSE
RETURN .F.
ENDIF
What I have found is this: the above works very fast if:
1- I have a connection to the web.
2- I never had a connection to the web.
2- I have a connection to the web, but unplug the Ethernet cable from the back of the computer.
However, in testing if I unplug like the Cable modem cable that goes to the router, then its extremely slow - to the point that some users would probably think the application has halted. I am thinking this is what the user might experience when thier Cable or DSL modem goes down.
Any suggestions on how to better deal with this? I am thinking I might need to just buy West-Wind's wwHTTP::HTTPPing class - but not positive that is the final solution.
Mel Cummings