我正在使用 IOKit 获取一些信息
kr = IOServiceGetMatchingServices(kIOMasterPortDefault, IOServiceNameMatching("AppleUSBEHCI"), &io_objects);
[snip]
kr = IORegistryEntryCreateCFProperties(child, &child_props, kCFAllocatorDefault, kNilOptions );
NSLog(@"Child props: %@", child_props);
//release child_props
}
IOObjectRelease(io_service);
}
sn = (CFStringRef) CFDictionaryGetValue(child_props, CFSTR("IOCFPlugInTypes"));
NSLog(@"sn: %@", sn);
我要找钥匙IOCFPlugInTypes
:
它有效,我回来了:
{
"9dc7b780-9ec0-11d4-a54f-000a27052861" = "IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle";
}
但我接下来需要做的就是得到上面写着的部分:9dc7b780-9ec0-11d4-a54f-000a27052861
谁能帮我解决这个问题?