1. 程式人生 > 實用技巧 >NX獲取計算機資訊

NX獲取計算機資訊

#include <uf.h>
#include <uf_ui.h>
#include <uf_exit.h>
#include <io.h>
#include <iostream>   
#include <fstream>
#include <string.h>
#include <stdio.h> 
#include <afxwin.h>
#include <winuser.h>
#include <windows.h>
#include <shlwapi.h>
#include 
<shlobj.h> #include <shellapi.h> #include <winuser.h> #include <tlhelp32.h> using namespace std; extern DllExport void ufsta(char *param, int *returnCode, int rlen) { /*獲得計算機資訊*/ UF_system_info_t info; UF_ask_system_info(&info); UF_UI_open_listing_window(); UF_UI_write_listing_window(info.date_buf);
//當前時間 UF_UI_write_listing_window("\n"); UF_UI_write_listing_window(info.user_name);//使用者名稱稱 UF_UI_write_listing_window("\n"); UF_UI_write_listing_window(info.program_name);//nx版本 UF_UI_write_listing_window("\n"); UF_UI_write_listing_window(info.node_name);//計算機名 UF_UI_write_listing_window("\n"); UF_UI_write_listing_window(info.machine_type); UF_UI_write_listing_window(
"\n"); UF_UI_write_listing_window(info.os_name); UF_UI_write_listing_window("\n"); UF_UI_write_listing_window(info.os_version); UF_UI_write_listing_window("\n"); } extern int ufusr_ask_unload( void ) { return( UF_UNLOAD_IMMEDIATELY ); }