📄 gpmis.h
字号:
// GPMIS.h : main header file for the GPMIS application
//
#if !defined(AFX_GPMIS_H__AAC74F0B_8FB5_4265_988B_AD672BBEADCF__INCLUDED_)
#define AFX_GPMIS_H__AAC74F0B_8FB5_4265_988B_AD672BBEADCF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
#include "blowfish.h"
/////////////////////////////////////////////////////////////////////////////
// CGPMISApp:
// See GPMIS.cpp for the implementation of this class
//
class CGPMISApp : public CWinApp
{
public:
CGPMISApp();
~CGPMISApp();
HACCEL m_hAccel;
CString m_strSysInfoPath;
void SingleInstance();
void SetRegistryKey(CString strRegistryKey)
{
m_strRegistryKey = strRegistryKey;
}
BOOL WriteRegistryValue(CString strSubKey,CString strName,LPCTSTR lpszValue,ULONG lType = REG_SZ);
BOOL GetRegistryValue(CString strSubKey,CString strName,CString &strValue,CString strDefaultValue = "",ULONG lType = REG_SZ);
BOOL GetRegistryValue(CString strSubKey,CString strName,BYTE* pbValue,CString strDefaultValue);
CString GetVersionInformation(LPCTSTR lpszModuleName);
CString GetPWD();
CString GetUID();
CString GetDSN();
int GetDBType();
BOOL ConnectDB();
_ConnectionPtr GetConnect()
{
return m_pConnect;
}
CBlowfish * GetBlowfish() const {
return m_pBlowfish;
}
CString GetWorkDirectory() const
{
return m_strWorkDir;
}
CString GetLogin() const {
return m_strLogin;
}
BOOL IsAdmin() const {
return m_bAdmin;
}
BOOL ReConnectDB()
{
if( m_pConnect )
m_pConnect->Close();
return ConnectDB();
}
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGPMISApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CGPMISApp)
afx_msg void OnAppAbout();
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
_ConnectionPtr m_pConnect;
CString m_strRegistryKey;
HKEY m_hkey;
CBlowfish *m_pBlowfish;
CString m_strDSN, m_strUID, m_strPWD;
CString m_strWorkDir;
HANDLE m_hProcessID;
LPBYTE m_lpData;
BOOL m_bAdmin;
CString m_strLogin;
void GetDataBaseStr();
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GPMIS_H__AAC74F0B_8FB5_4265_988B_AD672BBEADCF__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -