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