USBDeviceOpen eventually returns kIOReturnExclusiveAccess
USBDeviceOpen eventually returns kIOReturnExclusiveAccess
- Subject: USBDeviceOpen eventually returns kIOReturnExclusiveAccess
- From: Pete Gontier <email@hidden>
- Date: Thu, 27 Sep 2001 17:16:33 -0700
I'm revising a USB MIDI plug-in which is based on the Apple sample code.
USBDeviceScanner::ScanDevices fails when USBDeviceOpen returns
kIOReturnExclusiveAccess, "exclusive access and device already open".
If this error occurred every time, I'd think some other part of my code had
opened the device and forgotten to close it, perhaps on a previous
instantiation. But I'm pretty sure that's not the case, because this code
does work for a while after boot, but stops working after a few
instantiations (on the order of 3 to 6). After that, I can reboot to make it
start working again. Weird.
I'm running 10.0.4 vanilla on a G4 tower (part M5183) and using the
PlayNotes sample to test.
Any ideas what to look for? I know very little about what I'm doing here,
but have some experience with OMS and USB under 9, if that makes any
difference.
--
Pete Gontier -- pete at midiman dot net -- <
http://www.midiman.net/>