Look up a registered IOService object that matches a matching dictionary.
- macOS 10.2+
- Mac Catalyst 13.0+Beta
The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
A CF dictionary containing matching information, of which one reference is always consumed by this function (Note prior to the Tiger release there was a small chance that the dictionary might not be released if there was an error attempting to serialize the dictionary). IOKitLib can construct matching dictionaries for common criteria with helper functions such as IOServiceMatching, IOServiceNameMatching, IOBSDNameMatching.
The first service matched is returned on success. The service must be released by the caller.
This is the preferred method of finding IOService objects currently registered by IOKit (that is, objects that have had their registerService() methods invoked). To find IOService objects that aren't yet registered, use an iterator as created by IORegistryEntryCreateIterator(). IOServiceAddMatchingNotification can also supply this information and install a notification of new IOServices. The matching information used in the matching dictionary may vary depending on the class of service being looked up.
Create a matching dictionary that specifies an IOService match based on BSD device name.
Creates and returns a mach port suitable for receiving IOKit messages of the specified type.
Returns the mach port used to initiate communication with IOKit.
Creates and returns a notification object for receiving IOKit notifications of new devices or state changes.
Returns kernel retain count of an IOKit object. Identical to IOObjectGetKernelRetainCount() but available prior to Mac OS 10.6.
Checks two object handles to see if they represent the same kernel object.
Retains an object handle previously returned by IOKitLib.
Look up registered IOService objects that match a matching dictionary, and install a notification request of new IOServices that match.
Close a connection to an IOService and destroy the connect handle.
Create a matching dictionary that specifies an IOService class match.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software