NX获取计算机信息


#include 
#include 
#include 
#include 
#include    
#include 
#include <string.h>
#include  
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
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 );
}