Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WWIPStuff stalling
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00246980
Message ID:
00247083
Views:
21
>>>I have WWIPStuff sending email successfully UNLESS there is no internet connection live when I send my first email. If the connection is lost after one email is sent I get the correct error message. However if there is no connection when the first email goes out the whole program stalls. Time for Task Manager (which says it is "Not Responding") to close it.
>>>
>>>Very disconcerting, since the first email is usually when you discover you're off line.
>>>
>>>Any ideas? I couldn't find any function in Rick's classes to test this, but I'm a real novice at connectivity.
>>>
>>>TIA
>>>Barbara
>>
>>I've run into this as well, but found that it is just waiting to time out. I wish I knew the answer but...
>>
>>I attempteed to write a generic IsConnected() function to use before making any internet dependent moves, but got frustrated after half a days work and learneed later from Ed that the function in WinInet.dll that is supposed to tell this is broken, and almst always returns true (connected). This is what we need, IMHO- a generic IsConnected() function.
>
>And Ed got that from Rick Strahl, who pointed out some inconsistencies in responses I found in the returns from some of the WININET API calls. It doesn't behave as advertised. Rick's recommendation of trying to connect to a known IP address seems to be the best method of determining whether or not you can see the world, but it's not an instantaneous response. The thread in question was back in late wintrer/early spring of this year, if you're ambitious and want to find the gory details.
>
>You might want to look at using the WinSock control to test internet connectivity (I haven't done this inside a VFP app, so I don't have code on-hand to handle this in VFP); from the MSDN docs, the State property gives you some clues about the current state of an internet connection. There's some sample VB code in the topic Using the WInsock Control under Visual Basic Concepts that might be helpful as far as a template to listen and check the connection state.
Couldn't you just PING a known site and capture the results of the PING to see if you get a response?
PING 131.107.1.7 > pingtest.txt
Look for 'Timeout' or something like that.
Wayne
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform