LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -10 on opening ComPort after closing it

Solved!
Go to solution

Hello.

 

I'm developing a device driver for the remote control of a Powersupply with Labwindows/CVI 8.5.1.

The communication with the device is through a virtual USB-ComPort.

Using the driver-dll  in a test project shows, that everything works fine.

I can open the port, communicate with the device, and also the CloseCom CVI-function returns no error.

But if I want to reopen the ComPort after closing it, OpenComConfig returns errorcode -10 (Port in use).

I am sure that the Port is no longer in use, because the Port can be opened by another application after closing it.

 

in Pseudocode:

OpenComConfig(COM3,...) //works fine

CloseCom(COM3)               //works fine

OpenComConfig(COM3,...) //returns error -10

 

Thanks for help!

 

regards

re-G

 

 

0 Kudos
Message 1 of 2
(3,024 Views)
Solution
Accepted by topic author re-G

Problem solved.

It was my own fault

Sorry.

Thread can be deleted

re-G

0 Kudos
Message 2 of 2
(3,016 Views)