You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.4 KiB
57 lines
1.4 KiB
|
|
#pragma once
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// CRegEmit
|
|
// ---------------------------------------------------------------------------
|
|
class CRegEmit
|
|
{
|
|
private:
|
|
|
|
HRESULT _hr;
|
|
HKEY _hBaseKey;
|
|
|
|
CRegEmit();
|
|
|
|
public:
|
|
|
|
~CRegEmit();
|
|
|
|
HRESULT WriteDword(LPCWSTR pwzValue, DWORD dwData);
|
|
HRESULT WriteString(LPCWSTR pwzValue, CString &sData );
|
|
HRESULT WriteString(LPCWSTR pwzValue, LPCWSTR pwzData, DWORD ccData = 0);
|
|
HRESULT DeleteKey(LPCWSTR pwzSubKey);
|
|
|
|
static HRESULT Create(CRegEmit **ppEmit, LPCWSTR pwzRelKeyPath, CRegEmit *pParentEmit = NULL);
|
|
|
|
};
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// CRegImport
|
|
// ---------------------------------------------------------------------------
|
|
class CRegImport
|
|
{
|
|
private:
|
|
|
|
HRESULT _hr;
|
|
HKEY _hBaseKey;
|
|
|
|
CRegImport();
|
|
|
|
public:
|
|
|
|
~CRegImport();
|
|
|
|
HRESULT Check(LPCWSTR pwzValue, BOOL &bExist);
|
|
HRESULT ReadDword(LPCWSTR pwzValue, LPDWORD pdwData);
|
|
HRESULT ReadString(LPCWSTR pwzValue, CString &sData);
|
|
HRESULT EnumKeys(DWORD n, CString &sKey);
|
|
HRESULT EnumKeys(DWORD n, CRegImport **ppImport);
|
|
|
|
static HRESULT Create(CRegImport **ppImport, LPCWSTR pwzRelKeyPath, CRegImport *pParentImport = NULL);
|
|
static HRESULT Create(CRegImport **ppImport, LPCWSTR pwzRelKeyPath, HKEY hkeyRoot);
|
|
};
|
|
|
|
|