Return the bundle identifier of the given class.
SDKs
- macOS 10.4+
- Mac Catalyst 13.0+
Framework
- IOKit
Declaration
Parameters
classname
The name of the class as a CFString.
Return Value
The resulting CFStringRef. This should be released by the caller. If a valid class name is not passed in, then NULL is returned.
Discussion
This function uses the OSMetaClass system in the kernel to derive the name of the kmod, which is the same as the bundle identifier.