37 lines
1.0 KiB
C++
37 lines
1.0 KiB
C++
// GUCodeCreator.h: interface for the CGUCodeCreator class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_GUCODECREATOR_H__99500CB3_470C_4708_8CFD_D80E4B46F145__INCLUDED_)
|
|
#define AFX_GUCODECREATOR_H__99500CB3_470C_4708_8CFD_D80E4B46F145__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "iphlpapi.h"
|
|
#pragma comment(lib, "IPHlpApi.Lib")
|
|
|
|
class CGUCodeCreator
|
|
{
|
|
public:
|
|
void GetMacList(CStringArray *f_macArray);
|
|
CString GenerateGUCode(void); //生成GU编码
|
|
CString GenerateGUIDCode(void); //生成GUID编码
|
|
CString GenerateMacAddress(void); //生成MAC地址
|
|
|
|
CGUCodeCreator();
|
|
virtual ~CGUCodeCreator();
|
|
|
|
private:
|
|
bool ChangeTotalSecToCode(char *pCode);
|
|
bool ChangeMacAddressToCode(char* pCode);
|
|
DWORD m_dwCurTotalSec;
|
|
BYTE m_aMacAddress[6];
|
|
bool GetMacAddress(BYTE *pMacAddress);
|
|
DWORD GetTotalSecond();
|
|
char m_aMappingTable[32];
|
|
};
|
|
|
|
#endif // !defined(AFX_GUCODECREATOR_H__99500CB3_470C_4708_8CFD_D80E4B46F145__INCLUDED_)
|