Contents

IORegistryEntrySearchCFProperty(_:_:_:_:_:)

Create a CF representation of a registry entry's property.

Declaration

func IORegistryEntrySearchCFProperty(_ entry: io_registry_entry_t, _ plane: UnsafePointer<CChar>!, _ key: CFString!, _ allocator: CFAllocator!, _ options: IOOptionBits) -> CFTypeRef!

Parameters

  • entry:

    The registry entry at which to start the search.

  • plane:

    The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.

  • key:

    A CFString specifying the property name.

  • allocator:

    The CF allocator to use when creating the CF container.

  • options:

    kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard IORegistryEntryCreateCFProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children.

Return Value

A CF container is created and returned the caller on success. The caller should release with CFRelease.

Discussion

This function creates an instantaneous snapshot of a registry entry property, creating a CF container analogue in the caller's task. Not every object available in the kernel is represented as a CF container; currently OSDictionary, OSArray, OSSet, OSSymbol, OSString, OSData, OSNumber, OSBoolean are created as their CF counterparts. This function will search for a property, starting first with specified registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the same semantics as IORegistryEntryCreateCFProperty. The iteration keeps track of entries that have been recursed into previously to avoid loops.

See Also

Miscellaneous