M MayPeng macrumors member Original poster Nov 21, 2010 53 0 Apr 11, 2011 #1 #define kMyDriversIOKitClassName "USBSwitchDriver" IOServiceMatching(kMyDriversIOKitClassName); ioservicegetmatchingservices(m_match_port, hidDictionary, &iterator); USBSwitchDriver is a driver class name implemented by myself
#define kMyDriversIOKitClassName "USBSwitchDriver" IOServiceMatching(kMyDriversIOKitClassName); ioservicegetmatchingservices(m_match_port, hidDictionary, &iterator); USBSwitchDriver is a driver class name implemented by myself
K kainjow Moderator emeritus Jun 15, 2000 7,958 7 Apr 12, 2011 #2 The code snippet doesn't say much. Can you post more code?
balamw Moderator emeritus Aug 16, 2005 19,365 980 New England Apr 13, 2011 #3 MayPeng said: ioservicegetmatchingservices; Click to expand... 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
MayPeng said: ioservicegetmatchingservices; Click to expand... 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
M MayPeng macrumors member Original poster Nov 21, 2010 53 0 Apr 19, 2011 #4 balamw said: 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 Click to expand... 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!
balamw said: 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 Click to expand... 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!