// RegKey.h: interface for the CRegKey class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_REGKEY_H__9B377662_B2D0_11D1_ADFA_5254AB104A0B__INCLUDED_)
#define AFX_REGKEY_H__9B377662_B2D0_11D1_ADFA_5254AB104A0B__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

class /*AFX_EXT_CLASS*/ CRegKey  
{
public:
	CRegKey();
	virtual ~CRegKey();

// Operations
	BOOL Open(HKEY hKeyRoot, CString sPath);
	void Close();

	BOOL Write(CString sKey, int iVal);
	BOOL Write(CString sKey, CString sVal);
	BOOL Write(CString sKey, const BYTE * pData, int iLength);
	BOOL Read(CString sKey, int & iVal);
	BOOL Read(CString sKey, CString & sVal);
	BOOL Read(CString sKey, BYTE * pData, int & iLength);

protected:
	HKEY m_hKey;
	CString m_sPath;
};

#endif // !defined(AFX_REGKEY_H__9B377662_B2D0_11D1_ADFA_5254AB104A0B__INCLUDED_)
