Contents

IOServiceMatching(_:)

Create a matching dictionary that specifies an IOService class match.

Declaration

func IOServiceMatching(_ name: UnsafePointer<CChar>!) -> CFMutableDictionary!

Parameters

  • name:

    The class name, as a const C-string. Class matching is successful on IOService's of this class or any subclass.

Return Value

The matching dictionary created, is returned on success, or zero on failure. The dictionary is commonly passed to IOServiceGetMatchingServices or IOServiceAddNotification which will consume a reference, otherwise it should be released with CFRelease by the caller.

Discussion

A very common matching criteria for IOService is based on its class. IOServiceMatching will create a matching dictionary that specifies any IOService of a class, or its subclasses. The class is specified by C-string name.

See Also

Miscellaneous