PC Review


Reply
Thread Tools Rate Thread

COM port disappears

 
 
Richard Swinfen
Guest
Posts: n/a
 
      10th Dec 2004
I have written an application which uses the COM port COM1. It normally
works fine, but occasionally after I shut down the application and attempt
to restart it, the COM1 port disappears.

DOS can't see it either and anything that attempts to access it returns the
error code 67 ERROR_BAD_NET_NAME or "The network name cannot be found".

The only resolution is to restart Windows. When it happens I've tried
reassigning the COM port to a different number, disabling and re-enabling
the port through the hardware devices interface, to see if that 'resets' it,
but it still doesn't reappear.

If there was some way of determining the state of the port, or what might be
going wrong when I shut down the application, that might help me towards a
solution.

Any help much appreciated.

Richard.


 
Reply With Quote
 
 
 
 
Opa
Guest
Posts: n/a
 
      11th Dec 2004
From the way you describe the problem, it seems that your application does
nor restore the COM-port to it original settings when you quit the
application or when it hangs. Make sure you don't use COM1 and COM3 or COM2
and COM4 at the same time.

"Richard Swinfen" <Richard_rumoveme_@Swinfen.com> schreef in bericht
news:cpc8n9$gi1$(E-Mail Removed)...
>I have written an application which uses the COM port COM1. It normally
>works fine, but occasionally after I shut down the application and attempt
>to restart it, the COM1 port disappears.
>
> DOS can't see it either and anything that attempts to access it returns
> the error code 67 ERROR_BAD_NET_NAME or "The network name cannot be
> found".
>
> The only resolution is to restart Windows. When it happens I've tried
> reassigning the COM port to a different number, disabling and re-enabling
> the port through the hardware devices interface, to see if that 'resets'
> it, but it still doesn't reappear.
>
> If there was some way of determining the state of the port, or what might
> be going wrong when I shut down the application, that might help me
> towards a solution.
>
> Any help much appreciated.
>
> Richard.
>



 
Reply With Quote
 
Richard Swinfen
Guest
Posts: n/a
 
      12th Dec 2004
"Opa" <(E-Mail Removed)> wrote in message
news:41bae701$0$45946$(E-Mail Removed)...
> From the way you describe the problem, it seems that your application does
> nor restore the COM-port to it original settings when you quit the
> application or when it hangs. Make sure you don't use COM1 and COM3 or
> COM2 and COM4 at the same time.


Just use COM1. I certainly close the handle on exit and even if I didn't,
of course 'Windows' would close all the application's handles anyway. Are
you suggesting that I need to restore the baud rate, parity, cts etc.
settings as well? Not sure why that would be necessary nor why it would
cause this to happen?!

Richard.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COM Port disappears romain taillandier Microsoft Dot NET Compact Framework 7 28th Nov 2007 02:13 PM
Top Toolbar Disappears, Text Disappears =?Utf-8?B?UGFtZWx5bg==?= Windows XP Help 1 17th Nov 2007 09:28 PM
Missing port types : local port and Standard TCP/IP port programmer_not_admin Windows XP Print / Fax 3 28th Dec 2006 02:08 PM
Regedit Disappears / Taskmgr Disappears eb Windows XP New Users 1 7th Jan 2005 09:48 PM
Network Print Port Disappears after reboot David Windows XP Print / Fax 0 10th Jan 2004 06:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:25 PM.