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.
>
|