How to Free a USB port on VB.NET
-
Hello All: I'm using an SDK from a device that uses the USB to communicate in the SDK theres is a function that Initializes the port but there is no function or method to free the port, I already try to contact the vendor but I am not having any responce so if someone can helpme whit this, I will very tankful. JA
-
Hello All: I'm using an SDK from a device that uses the USB to communicate in the SDK theres is a function that Initializes the port but there is no function or method to free the port, I already try to contact the vendor but I am not having any responce so if someone can helpme whit this, I will very tankful. JA
If there isn't a function to Close/Release/Free the port, then your going to have to contact the manufacturer and find out why and what should be done. Another possibility is searching for any sample code, either in the docs for the SDK or on the web, that shows what should be used. But, as with any SDK, what the procedures are and what function names are used depends ENTIRELY on the SDK and the device your using. RageInTheMachine9532
-
If there isn't a function to Close/Release/Free the port, then your going to have to contact the manufacturer and find out why and what should be done. Another possibility is searching for any sample code, either in the docs for the SDK or on the web, that shows what should be used. But, as with any SDK, what the procedures are and what function names are used depends ENTIRELY on the SDK and the device your using. RageInTheMachine9532
-
Thanks for your response, I have other question, when I exit the application the port, becomes available, is there a way to close this reference in the application?, or in the main form ?(This is were I'am using this device). Javier Ayala
The port becomes available because when your app quits, it releases its resources. This is apparently causing the API to close the port it has open. Once again, it's all in the SDK, there is no standard method of talking to all devices when using an SDK. It MUST be done through calls into the SDK. But if they are not documented, your best bet is the manufacturer. RageInTheMachine9532
-
The port becomes available because when your app quits, it releases its resources. This is apparently causing the API to close the port it has open. Once again, it's all in the SDK, there is no standard method of talking to all devices when using an SDK. It MUST be done through calls into the SDK. But if they are not documented, your best bet is the manufacturer. RageInTheMachine9532
-
Tanks, I already contact the vendor of the device and It toll me that It doesnt have this method, so I thing I am going to try a low level approach, what you thing? JA
Probably possible, but if your SDK doesn't have to functionality to close a port that it opens, be prepared for a crash when you close the port, but not have the SDK release its resources. RageInTheMachine9532