CYAPI - Detect if some other application is using the USB device
Anonymous
Not applicable
Apr 01, 2009
12:00 AM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Apr 01, 2009
12:00 AM
Question: How do I detect using the CYAPI library, if some other application is already using my USB device?
Answer:
The IsOpen() method can be used to check the same. This method is a member of the CCyUSBDevice class. The IsOpen( ) method returns true if CCyUSBDevice object already has a valid handle to a device attached to the CyUSB driver.
For example:
if(USBDevice -> IsOpen())
{
// The device is open and is being used by another application
// This condition is also true if the current application has opened the device and has a handle
}
Rate this article:
Contributors
-
This widget could not be displayed.Anonymous