Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kIOReturnExclusiveAccess from USBInterfaceOpen in USB MassStorage Device




----- Original Message ----- From: "Joseph Kelly" <email@hidden>
To: "EricLee" <email@hidden>
Sent: Friday, December 28, 2007 12:48 AM
Subject: Re: kIOReturnExclusiveAccess from USBInterfaceOpen in USB MassStorage Device




On Dec 23, 2007, at 5:52 PM, EricLee wrote:


Dear all,

I am new to Mac and IOKit. My sytem is Mac OSX 10.4, Xcode is 2.5 version.

I try to revise a sample code which exists in /Developer/Examples/ IOkit/usb to apply in my Mass storage device.

This sample code  is "USBNotification Example" that access a usb  device.

I have been success to execute USBDeviceOpen, IOCreatePlugInInterfaceForService and QueryInterface functions.

But when I want to execute USBInterfaceOpen function, it is failed and return kIOReturnNotOpen error code.

I'm confused -- are you getting kIOReturnNotOpen or kIOReturnExclusiveAccess?


kIOReturnExclusiveAccess would mean that another process is using the device -- i.e. it could be the kernel has gone ahead and matched a file system driver to the device, just a guess. There are workarounds for this -- search the archive for "codeless kext".


Because the USBDeviceOpen function can be success to be executed, I think this is not Classic problem.


The interface seems to be opened by other application. Where can I to check which application open this Interface?
If the interface is opened by other driver, how can I to access this device?


Thanks very much~~

Best Regards.

PS. Another no-related quest:
I try to execute USBInterfaceOpenSeize function, but build occurs error:'struct IOUSBInterfaceStruct' has no member function
USBInterfaceOpenSeize is available with IOUSBInterfaceInterface183 and above, and IOUSBInterfaceInterface183 are available on Mac OS X version 10.1 and later.
So in my system, I should have the IOUSBInterfaceInterface183 definition.
How do I to revise this build error??

Just declare all your references as IOUSBInterfaceInterface183:

IOUSBInterfaceInterface** myInterface;

becomes:

IOUSBInterfaceInterface183** myInterface;

etc.



Hope that helps,

Joe K.




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >kIOReturnExclusiveAccess from USBInterfaceOpen in USB MassStorage Device (From: "EricLee" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.