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: USB example (Carbon)



On 8 Mar 2007, at 20:09, Christopher Mackey <email@hidden> wrote:
Subject: USB example (Carbon)

Hello,
I was wonder if any one had an example of a project in which a USB device is
attached to a mac, and a user interface is running at the same time. I have
not been able to find anything along the lines of what I am trying to do.
Any help that you can give me will be greatly appreciated.


Thanks
Christopher Mackey

Hi Christopher

Not sure what you're after here - do you mean the OS to start an application when the device is plugged in, or do you have an application running already that needs to respond appropriately when the device is plugged in or unplugged?

The former case will require you to write a kernel extension so that the OS is primed to wait for the device to appear on the USB ports. The latter case is covered by the USBPrivateDataSample example which demonstrates how to use IOKitLib and IOUSBLib to set up asynchronous callbacks when a USB device is attached to, or removed from, the system. It also shows how to associate arbitrary data with each device instance.

Hope this helps.

Colin

------------------------------------------------------------------------ ---------------

Colin Bridgewater

"My other vehicle is a mid-bulk transport: 03-K64, class: Firefly"

------------------------------------------------------------------------ ---------------

_______________________________________________
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


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.