On Sep 27, 2009, at 2:46 AM, searockcliff wrote:
I have a driver which uses IOUserClient.
When the drriver is being used by the client application, kextunload will fail and reports that there are client instances.
How could I know the existance of the instace of IOUserClient in driver, so I can refuse to unload in terminate() function? As kextunload knows that.
::terminate will normally fail if the driver is open. Your userclient should call ::open/::close on your driver to indicate that it's in use.
If you need to support more than one userclient at the same time, you will need to implement ::handleOpen/::handleIsOpen in the driver.
= Mike
--
True terror is to wake up one morning and discover that your high school class is running the country. -- Kurt Vonnegut