2012-02-24 35 views

回答

0

看一看这篇文章"How to get hardware and network info"

如果您有64位架构的麻烦 - 或者你的应用程序只需简单地是一个64位的应用程序 - 考虑到IO部分移动到一个辅助工具并使用分布式对象访问它。

看一看Creating XPC Services

+0

当然我确实,但正如我所提到的,它的目的是为32位应用程序。 – xyz 2012-02-24 10:41:17

+0

编译器在实现'computerSerialNumber'方法时说什么?我已经使用IOKit实现了一个苹果远程包装器,并且从未遇到64位问题。 – 2012-02-24 10:44:23

+0

' “_IOMasterPort”'(...) ' “_IORegistryGetRootEntry”'(...) ' “_IORegistryEntrySearchCFProperty”'(...) 'LD:符号(S)未找到架构x86_64' – xyz 2012-02-24 11:07:57

0

简单的方法是执行:

名为ioreg -l | grep IOPlatformSerialNumber | awk'{print $ 4}'