#ifndef _REGOBJECT_H_
#define _REGOBJECT_H_

class CRegOp
{
public:
	CRegOp();
	~CRegOp();
	int ReadReg(HKEY hKey, LPCTSTR szDs, LPCTSTR szKey, int nDef);
	void ReadReg(HKEY hKey, LPCTSTR szDs, LPCTSTR szKey, LPCTSTR szDef, LPTSTR szBuf, int nBufLen);
	BOOL WriteReg(HKEY hKey, LPCTSTR szDs, LPCTSTR szKey, int nValue);
	BOOL WriteReg(HKEY hKey, LPCTSTR szDs, LPCTSTR szKey, LPCTSTR szValue, 
		DWORD cbData, DWORD dwType=REG_SZ);
	BOOL IsExist(HKEY hKey, LPCTSTR szDs, LPCTSTR szKey);
private:
	BOOL CreateReg(HKEY hKey, LPCTSTR lpszSubKey, PHKEY pResult=NULL);
};

#endif