我是靠谱客的博主 凶狠香氛,这篇文章主要介绍UG二次开发-调用篇:API获取电脑系统相关信息,现在分享给大家,希望可以做个参考。

API获取电脑系统相关信息

static void do_api()

{

UF_system_info_t sysinfo;

UF_ask_system_info(&sysinfo);

vector<string> info;

char msg[256+1] = " ";

sprintf(msg,"日期 : %sn",sysinfo.date_buf);

info.push_back(msg);

sprintf(msg,"主板信息 : %sn",sysinfo.machine_type);

info.push_back(msg);

sprintf(msg,"电脑名 : %sn",sysinfo.node_name);

info.push_back(msg);

sprintf(msg,"系统版本 : %sn",sysinfo.os_name);

info.push_back(msg);

sprintf(msg,"处理器 : %sn",sysinfo.os_version);

info.push_back(msg);

sprintf(msg,"UG版本 : %sn",sysinfo.program_name);

info.push_back(msg);

sprintf(msg,"用户名 : %sn",sysinfo.user_name);

info.push_back(msg);

UF_free_system_info(&sysinfo);

// 把信息列表输出到窗口

UF_UI_exit_listing_window();

UF_UI_open_listing_window();

int size = info.size();

for (int i=0; i<size; i++)

{

UF_UI_write_listing_window(info[i].c_str());

}

}

最后

以上就是凶狠香氛最近收集整理的关于UG二次开发-调用篇:API获取电脑系统相关信息的全部内容,更多相关UG二次开发-调用篇内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(47)

评论列表共有 0 条评论

立即
投稿
返回
顶部