简体   繁体   English

什么是MacOS C ++开发的Windows WMI的等效?

[英]What is the Equivalent of Windows WMI for MacOS C++ Development?

I have a C++ application that gets detailed system information (processor type, available disk space, other hardware profile info) on Windows using WMI. 我有一个C ++应用程序,使用WMI在Windows上获取详细的系统信息(处理器类型,可用磁盘空间,其他硬件配置文件信息)。 I want to perform the same type of operations on OSX 10.5+. 我想在OSX 10.5+上执行相同类型的操作。 What is the equivalent API or interface for MacOS? MacOS的等效API或接口是什么?

Links to API documentation or tutorials are very welcome. 非常欢迎链接到API文档或教程。

You can query most of that information through the system_profiler executable. 您可以通过system_profiler可执行文件查询大部分信息。 Apple's example for querying such informations involves a popen call to it, so I guess it's the way to go. Apple查询此类信息的示例包括popen调用它,所以我想这是要走的路。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM