forked from tianzhansheng/virtuanessrc097
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRegistry.h
37 lines (28 loc) · 2.09 KB
/
Registry.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// レジストリサポートクラス
//
#ifndef __CREGISTRY_INCLUDED__
#define __CREGISTRY_INCLUDED__
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
#include <TCHAR.h>
#include <string>
using namespace std;
class CRegistry
{
public:
static void SetRegistryKey( LPCSTR lpszKey );
static UINT GetProfileInt ( LPCSTR lpszSection, LPCSTR lpszEntry, INT nDefault );
static BOOL GetProfileString( LPCSTR lpszSection, LPCSTR lpszEntry, LPVOID lpData, UINT nBytes );
static BOOL GetProfileBinary( LPCSTR lpszSection, LPCSTR lpszEntry, LPVOID lpData, UINT nBytes );
static BOOL WriteProfileInt( LPCSTR lpszSection, LPCSTR lpszEntry, INT nValue );
static BOOL WriteProfileString( LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszValue );
static BOOL WriteProfileBinary( LPCSTR lpszSection, LPCSTR lpszEntry, LPVOID pData, UINT nBytes );
protected:
static CHAR m_szRegistryKey[MAX_PATH];
static HKEY GetRegistryKey();
static HKEY GetSectionKey( LPCTSTR lpszSection );
private:
};
#endif // !__CREGISTRY_INCLUDED__