Thanks for the pointer. Yes, this is from within a user-mode OS X app. I can do 
everything successfully but call the USBDeviceReEnumerate() function.

In a nutshell, I iterate through IOIteratorNext():
If there is a match of vid/pid:
 invoke IORegistryEntryGetName()
 invoke IORegistryEntryGetPath()
 invoke IORegistryEntryCreateCFProperties()
 invoke IOCreatePlugInInterfaceForService()
 invoke QueryInterface() to get the device interface
(all of the above works successfully)
and then try to invoke USBDeviceReEnumerate(), which seems to exist in the 
Twilight Zone.

But Xcode doesn’t resolve the function. I can manually place a function 
prototype in my code to get it to build, but at runtime, when it invokes 
USBDeviceReEnumerate(), it crashes with a EXC_BAD_ACCESS due to the function’s 
unresolved address being 0x00000000. This happens both on 10.9 and 10.10 
systems. 

If there were sample code that actually invoked USBDeviceReEnumerate(), that 
would be great. Somehow it appears to exist, but just beyond my reach…

-Carl


On Dec 15, 2014, at 3:10 PM, Fernando Urbina <[email protected]> wrote:

> You need to take a look at some of the sample code in order to understand how 
> to use IOUSBLib.h.  This is one of my favorite sample code snippets:
> 
> https://developer.apple.com/library/mac/samplecode/USBPrivateDataSample/Introduction/Intro.html
> 
> 
> 
> Woof,
> 
> Nano Urbina
> Build Slave
> Razz Software
> http://www.razzsoftware.com   
> 


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/usb/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to