Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MayPeng

macrumors member
Original poster
Nov 21, 2010
53
0
#define kMyDriversIOKitClassName "USBSwitchDriver"
IOServiceMatching(kMyDriversIOKitClassName);
ioservicegetmatchingservices(m_match_port, hidDictionary, &iterator);

USBSwitchDriver is a driver class name implemented by myself
 

MayPeng

macrumors member
Original poster
Nov 21, 2010
53
0
Shouldn't that be:

Code:
IOServiceGetMatchingServices

It is case sensitive you know!

What happens if you try to find something that isn't implemented by yourself.

B

Sorry for it. Above it will appear in 64bit mac os, but 32bit os is ok.

Another problem :
My device is hid device, if I use the following code, my device can't be found.
IOHIDManagerRef mgr;

mgr = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
IOHIDManagerSetDeviceDeviceMatching(mgr, NULL);
IOHIDManagerOpen(mgr, kIOHIDOptionsTypeNone);

CFSetRef device_set = IOHIDManagerCopyDevices(mgr);

CFIndex num_devices = CFSetGetCount(device_set);

.....

then I print all device fount(num_devices = 4), which are apple keyboard ,mouse and so on, my device can't be found.

Why? thank u!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.