Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 11, 2011, 11:11 PM   #1
MayPeng
macrumors member
 
Join Date: Nov 2010
ioservicegetmatchingservices() returning empty iterator

#define kMyDriversIOKitClassName "USBSwitchDriver"
IOServiceMatching(kMyDriversIOKitClassName);
ioservicegetmatchingservices(m_match_port, hidDictionary, &iterator);

USBSwitchDriver is a driver class name implemented by myself
MayPeng is offline   0 Reply With Quote
Old Apr 12, 2011, 09:25 PM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
The code snippet doesn't say much. Can you post more code?
kainjow is offline   0 Reply With Quote
Old Apr 13, 2011, 12:46 PM   #3
balamw
Moderator
 
balamw's Avatar
 
Join Date: Aug 2005
Location: New England, USA
Quote:
Originally Posted by MayPeng View Post
ioservicegetmatchingservices;
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
__________________
MBA (13" 1.7 GHz 128GB), UMBP (15" SD 2.8 GHz), UMB (13" 2.4 GHz), iMac (17" Yonah), 32GB iPad 3 WiFi+LTE, 64 GB iPad WiFi, 32 GB iPhone 5, Airport Extreme
balamw is offline   0 Reply With Quote
Old Apr 19, 2011, 05:19 AM   #4
MayPeng
Thread Starter
macrumors member
 
Join Date: Nov 2010
Quote:
Originally Posted by balamw View Post
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!
MayPeng is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Is anyone returning their 5S? GeorgieAcevedo iPhone 142 Sep 24, 2013 05:11 AM
Returning to ML shonboy OS X Mavericks (10.9) 3 Sep 13, 2013 12:11 PM
iPad: Returning slitherjef iPad 4 Jan 7, 2013 02:59 PM
iPhone: Returning to 5.1.1 from 6 GM IcyStorm Jailbreaks and iOS Hacks 1 Sep 12, 2012 09:54 PM
Empty brendu iPhone 0 May 31, 2012 08:05 PM

Forum Jump

All times are GMT -5. The time now is 04:05 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC