Performs an OSDynamicCast operation on an IOKit object.
SDKs
- macOS 10.0+
- Mac Catalyst 13.0+
Framework
- IOKit
Declaration
func IOObjectConformsTo(_ object: io _object _t, _ className: Unsafe Pointer<Int8>!) -> boolean _t
Parameters
object
An IOKit object.
className
The name of the class, as a C-string.
Return Value
If the object handle is valid, and represents an object in the kernel that dynamic casts to the class true is returned, otherwise false.
Discussion
This function uses the OSMetaClass system in the kernel to determine if the object will dynamic cast to a class, specified as a C-string. In other words, if the object is of that class or a subclass.