atsregkey.h

来自「AtScript 1.1 一个很好用的脚本引擎,可以很方便的在你的软件中实现脚本」· C头文件 代码 · 共 58 行

H
58
字号
#if !defined(AFX_ATSREGKEY_H__15796546_EB23_11D2_8E55_00C00C02B5CD__INCLUDED_)
#define AFX_ATSREGKEY_H__15796546_EB23_11D2_8E55_00C00C02B5CD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//-------------------------------------------------------
// 注册表的操作类 : CAtsRegKey
//
// Author : JonFlow
// Modify : 1999/10/29
//
// -------------------------------------------------------
#include "AtsDef.h"

class CAtsRegKey
{
public:
	CAtsRegKey() {m_hKey = NULL;}
	~CAtsRegKey() {Close();}

// Attributes
public:
	HKEY	m_hKey;

public:
	BOOL	DeleteSubKey(LPCTSTR lpszSubKey);
	BOOL	RecurseDeleteKey(LPCTSTR lpszKey);
	BOOL	SetStringValue(LPCTSTR pszKey , CAtsString strValue );
	BOOL	GetStringValue(LPCTSTR pszKey , CAtsString& strValue );
	BOOL	SetIntValue( LPCTSTR pszKey , int nValue );
	BOOL	GetIntValue( LPCTSTR pszKey , int &nValue );
	BOOL	SetDWordValue (LPCTSTR pszKey, DWORD dwVal);
	BOOL	GetDWordValue(LPCTSTR pszKey, DWORD& dwVal);
	BOOL	DeleteValue(LPCTSTR lpszValue);

	BOOL	ExistKey(LPCTSTR pszPath);
	BOOL	ExistValue (LPCTSTR pszValue);

	static	BOOL ExistKey( HKEY hKeyRoot, LPCTSTR pszPath );
	static	BOOL RemoveRegItem(CAtsString strRegInfo);
	static	BOOL GetElementItem(CAtsString &strStuff, CAtsString &strItem,CAtsString strApart);
	static	HKEY GetRootkey( CAtsString strKey);
// Operations
public:
	BOOL	Create(HKEY hKey, LPCTSTR lpszKeyName);
	BOOL	Open(HKEY hKey, LPCTSTR lpszKeyName , REGSAM keyOption = KEY_READ|KEY_WRITE );

	void	Close();

// Overrides

// Implementation
protected:
};

/////////////////////////////////////////////////////////////////////////////
#endif // !defined(AFX_ATSREGKEY_H__15796546_EB23_11D2_8E55_00C00C02B5CD__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?