#if _MSC_VER > 1000
|
#pragma once
|
#endif // _MSC_VER > 1000
|
// CommFun.h : header file
|
//
|
|
class CQLConnMgr;
|
|
#define FILE_LOG _T( "C:\\OIServiceC_%s.log" ) // ÈÕÖ¾Îļþ£¬¿ÉÒÔ¼Óºó׺
|
|
/////////////////////////////////////////////////////////////////////////////
|
// CQLCommFun window
|
|
class AFX_EXT_CLASS CQLCommFun
|
{
|
// Construction
|
public:
|
CQLCommFun();
|
virtual ~CQLCommFun();
|
|
// Attributes
|
public:
|
|
// Operations
|
public:
|
static CString GetVersion();
|
|
static CQLConnMgr * GetConnMgr();
|
static BOOL CheckSN( CString strSN, CString strKey, CString &strError );
|
|
static BOOL GetStrItem( CString &strBuff, CString &strItem, char chApart );
|
static BOOL GetStrItem( CString &strBuff, CString &strItem, CString strApart );
|
static int FindStrItem( CStringArray &asItems, CString strItem );
|
|
static BOOL CompressData( CString strSourcePathName, CString strDestFile, BOOL bIncFolderSelf = true );
|
static BOOL DecompressData( CString strSourceFile, CString strDestPath );
|
static BOOL CompressFolder( CString strPathName, CString strFileName, BOOL bIncFolderSelf = true );
|
static BOOL CompressFile( CString strSourceFile, CString strDestFile );
|
|
static BOOL ExistFile( CString strFileName );
|
static CString GetModulePath();
|
static CString GetPathName( CString strFileName );
|
static CString GetFileName( CString strPathName );
|
|
static UINT GetCharSet();
|
static BOOL WriteLineToTextFile( CString strFileName, CString strLineData );
|
static bool WriteLogFile( CString strFileName, CString strLog ); // дÈÕÖ¾ÖÁÎļþ£¬Èç¹ûÎļþ²»´æÔÚ£¬Ôò´´½¨Îļþ£¬Èç¹û´æÔÚ£¬¶ø×·¼ÓÐÅÏ¢¡£
|
|
static CString GetLocalIP(); // µÃµ½±¾»ú IP
|
static CString GetMacAddr(); // µÃµ½µ±Ç°Íø¿¨µØÖ·
|
|
static BOOL ParseParam( CString strStuff, CStringArray &asVarName, CStringArray &asValue, CString strApart );
|
static BOOL GetParam( CString strStuff, CString strParamName, CString &strParamValue, CString strApart );
|
static BOOL GetParam( CStringArray &asVarName, CStringArray &asValue, CString strParamName, CString &strParamValue );
|
|
static CString Encrypt( CString strData, CString strKey );
|
static CString Decrypt( CString strData, CString strKey );
|
static CString EncryptEM( CString strData );
|
static CString DecryptEM( CString strData );
|
|
static CString GetErrInfo( long nErrCode, CString strLanguage = _T( "CHS" ) );
|
static CString GetErrInfo_Eng( long nErrCode );
|
static CString GetErrInfo_Chs( long nErrCode );
|
|
};
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//{{AFX_INSERT_LOCATION}}
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|