已經封裝成動態庫形式,方便使用!
//標準C DLL導出格式
#ifndef _GETHARDINFO_H_
#define _GETHARDINFO_H_
#ifdef MYAPI_EXPORTS
#define WIN32DLL_API __declspec(dllexport)
#else
#define WIN32DLL_API __declspec(dllimport)
#endif
#ifdef __cplusplus
extern "C" {
#endif
//函數寫在這
// WIN32DLL_API float Add(float,float);
//獲取CPU ID 16位字符串,輸入17位buf[17],獲取失敗返回false,成功返回:true
WIN32DLL_API bool GetCPUID(char *buf,int len);
//獲取MAC地址,12位字符串,輸入13位buf[13],獲取失敗返回false,成功返回:true
WIN32DLL_API bool GetMACID(char *buf,int len);
//獲取硬盤ID,12位字符串,輸入13位buf[13],獲取失敗返回false,成功返回:true
WIN32DLL_API bool GetDiskID(char *buf,int len);
//獲取硬件唯一信息,20位字符串長度,獲取失敗返回false,成功返回:true
WIN32DLL_API bool GetHardID(char *buf,int len);
#ifdef __cplusplus
}
#endif
#endif
下載地址:http://download.csdn.net/detail/xiaoy_2012/9614522