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: How to let OS reload driver without repluging my usb device?



circa 1/8/03 12:58, Mark Ketilson <email@hidden> wrote:

> If you want to reload the driver within a kext or within user space try
> the ReEnumerateDevice command or the USBDeviceReEnumerate command.
> These can be found in the darwin IOKit API reference documentation.

circa 1/9/03 13:21, Chen <email@hidden> wrote:

> That is a useful suggestion for me to start the work.But, it still has some
> problem even if i can do it with that way. The problem is : OS will pop out a
> warnning message like "The storage device that you just remover was not
> propery out away before being removed from this computer.Data ..."   . To
> avoid appearing this message, I must choose its icon and Eject it or Drag it
> to trash. So, befor unload driver, I must do something like the action of
> Choose its icon and Eject it or drag it to trash. Do u know how to do
> it?Thanks.

This is not a USB question. Underneath your program, you are talking to USB.
But your program is underneath the file system. You need some way to tell
the file system to eject the disk. Or you need some way to hide from the
file system that your device is temporarily going offline.

I take the latter approach in my Mac OS 9 MIDI driver to support a hybrid
audio/MIDI device. When the user changes audio settings, the only way for
them to take effect is for the device to leave the bus and return. The audio
driver informs my MIDI driver that this is about to happen so the MIDI
driver can make sure not to break the connection to MIDI applications. It
does this by keeping some data around in memory in anticipation of the
device coming back online, and MIDI applications never know it happened.

  -- 

    Pete Gontier -- pete at m-audio dot com -- <http://www.m-audio.com/>
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Re: How to let OS reload driver without repluging my usb device? (From: "Chen" <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.