Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Richard Clarke
  Where is Richard Clarke?
 Crowcombe
 United Kingdom
 Richard Clarke
 To: Don Higgins
  Where is Don Higgins?
 Peoria
 Illinois - United States
 Don Higgins
 Tags
Subject: RE: mscomm error control
Thread ID: 155297 Message ID: 155312 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Errors & Debugging
Date: Saturday, December 29, 2007 7:04:48 PM         
   


> Those that use mscomm32 in their apps how do you handle errors such as nothing plugged into the comm port?
>
> I use a generic error control when I try to open the port but no error number comes to the error logging program.
>
> I need to generate a message when the port is not available or not responding.
>
> I looked up the error messages on Microsoft.com but they did not come back with 8000,8005,8018.
>
>
> Don Higgins
>
>
>
>
>


Don,

The generic error trapping in the error method on the form should give you: -

1. If you try and open port that is not available, i.e. it doesn't physically exist on the pc, you should get error number 8008.

2. If you try and open a port that exists but is in use you will get error number 8005.

The only way i know to see if a device is attached to the comm port, switched on and working is to send a command that the device will send back a response to. Send the command and if it doesn't respond then it ain't there.


Regards



Richard Clarke

ENTIRE THREAD

mscomm error control Posted by Don Higgins @ 12/29/2007 9:20:59 AM
RE: mscomm error control Posted by Richard Clarke @ 12/29/2007 7:04:48 PM
RE: mscomm error control Posted by Don Higgins @ 12/29/2007 8:38:57 PM
RE: mscomm error control Posted by Richard Clarke @ 12/29/2007 9:01:39 PM
RE: mscomm error control Posted by Don Higgins @ 12/29/2007 10:09:47 PM
RE: mscomm error control Posted by Richard Clarke @ 12/31/2007 3:13:47 PM