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: Classic hogging USB device



Larry,

There are 2 possible solutions for you.

1. Implement a codeless kext - In the Developer/Examples/Kernel/IOKit/usb/ folder, there is the ClassicNotSeize Driver sample which demonstrates a sample project which you can use to create a codeless kext such that the system will be told to not allow Classic to match to your device.

2. Implement your code to use the USBDeviceOpenSeize call instead. Some of the details escape me, but I think that if the openSeize call fails, there is a notifier which will tell you when Classic has released it's access to the device, whereupon you can then open the device.

rich

At 11:15 AM -0600 9/13/05, Dr. Lawrence W. James wrote:
Hi,

I am trying to communicate with a Vendor Specific USB Device which does not have a driver built into Mac OS X. I am using code which is basically a copy of the Apple sample code. I noticed that when I got to the line

kernalerror = (*device)->USBDeviceOpen(device);

I got a kIOReturnExclusiveAccess error and the device would not open. This error must mean that some other process has the device open, but as far as I could see, I had no other processes running that would be looking for a USB device, let alone finding and opening this one. After much restarting and trying to run this and not run that, I finally figured out that when a program in the Classic environment is running I get the kIOReturnExclusiveAccess error, but if no Classic program is running I don't get an error and I can open the device. Not all Classic programs will cause Classic to grab the device, but many will which should have no idea that a USB interface even exists (Photoshop 2.5 or SimpleText for example).

Is there any way that I can get Classic to give up the device? Baring that, is there any way to tell which Classic programs will cause this problem so that I can warn our program users not to run those programs at the same time?

Thanks for any wisdom you have,

Larry
_______________________________________________
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

-- Sincerely, Rich Kubota email@hidden (408) 974-6212 _______________________________________________ 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: 
 >Classic hogging USB device (From: "Dr. Lawrence W. James" <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.