ReactOS 0.4.15-dev-8222-g9164419
CicRegKey Class Reference

#include <cicreg.h>

Collaboration diagram for CicRegKey:

Public Member Functions

 CicRegKey ()
 
 ~CicRegKey ()
 
 operator HKEY ()
 
LSTATUS Open (HKEY hKey, LPCTSTR lpSubKey, REGSAM samDesired=KEY_READ)
 
LSTATUS Create (HKEY hKey, LPCTSTR lpSubKey)
 
void Close ()
 
LSTATUS QueryDword (LPCTSTR pszValueName, LPDWORD pdwValue)
 
LSTATUS SetDword (LPCTSTR pszValueName, DWORD dwValue)
 
LSTATUS QuerySz (LPCTSTR pszValueName, LPTSTR pszValue, DWORD cchValueMax)
 
LSTATUS SetSz (LPCTSTR pszValueName, LPCTSTR pszValue)
 
LSTATUS SetSzW (LPCWSTR pszValueName, LPCWSTR pszValue)
 
LSTATUS DeleteValue (LPCTSTR pszValueName)
 
LSTATUS DeleteSubKey (LPCTSTR lpSubKey)
 
LSTATUS RecurseDeleteKey (LPCTSTR lpSubKey)
 
LSTATUS EnumValue (DWORD dwIndex, LPTSTR lpValueName, DWORD cchValueName)
 

Public Attributes

HKEY m_hKey
 

Detailed Description

Definition at line 10 of file cicreg.h.

Constructor & Destructor Documentation

◆ CicRegKey()

CicRegKey::CicRegKey ( )
inline

Definition at line 15 of file cicreg.h.

15: m_hKey(NULL) { }
HKEY m_hKey
Definition: cicreg.h:13
#define NULL
Definition: types.h:112

◆ ~CicRegKey()

CicRegKey::~CicRegKey ( )
inline

Definition at line 16 of file cicreg.h.

16{ Close(); }
void Close()
Definition: cicreg.h:89

Member Function Documentation

◆ Close()

void CicRegKey::Close ( )
inline

Definition at line 89 of file cicreg.h.

90{
91 if (!m_hKey)
92 return;
93
95 m_hKey = NULL;
96}
#define RegCloseKey(hKey)
Definition: registry.h:49

Referenced by _cicRegKey_Create(), _cicRegKey_Open(), _cicRegKey_RecurseDeleteKey(), and ~CicRegKey().

◆ Create()

LSTATUS CicRegKey::Create ( HKEY  hKey,
LPCTSTR  lpSubKey 
)
inline

Definition at line 56 of file cicreg.h.

57{
58 return _cicRegKey_Create(*this, hKey, lpSubKey);
59}
EXTERN_C LSTATUS _cicRegKey_Create(CicRegKey &self, HKEY hKey, LPCTSTR lpSubKey)
Definition: cicreg.cpp:25
FxAutoRegKey hKey

Referenced by CLangBarItemList::SaveItem(), CDefCompFrameWindow::SavePosition(), CTipbarWnd::SavePosition(), and TF_RegisterLangBarAddIn().

◆ DeleteSubKey()

LSTATUS CicRegKey::DeleteSubKey ( LPCTSTR  lpSubKey)
inline

Definition at line 103 of file cicreg.h.

104{
105 return ::RegDeleteKey(m_hKey, lpSubKey);
106}

Referenced by _cicRegKey_RecurseDeleteKey().

◆ DeleteValue()

LSTATUS CicRegKey::DeleteValue ( LPCTSTR  pszValueName)
inline

Definition at line 98 of file cicreg.h.

99{
100 return ::RegDeleteValue(m_hKey, pszValueName);
101}

Referenced by CLangBarItemList::SaveItem().

◆ EnumValue()

LSTATUS CicRegKey::EnumValue ( DWORD  dwIndex,
LPTSTR  lpValueName,
DWORD  cchValueName 
)
inline

Definition at line 108 of file cicreg.h.

109{
110 return _cicRegKey_EnumValue(*this, dwIndex, lpValueName, cchValueName);
111}
EXTERN_C LSTATUS _cicRegKey_EnumValue(CicRegKey &self, DWORD dwIndex, LPTSTR lpValueName, DWORD cchValueName)
Definition: cicreg.cpp:39

Referenced by GetHKLSubstitute(), and InitSkipRedrawHKLArray().

◆ Open()

LSTATUS CicRegKey::Open ( HKEY  hKey,
LPCTSTR  lpSubKey,
REGSAM  samDesired = KEY_READ 
)
inline

◆ operator HKEY()

CicRegKey::operator HKEY ( )
inline

Definition at line 18 of file cicreg.h.

18{ return m_hKey; }

◆ QueryDword()

LSTATUS CicRegKey::QueryDword ( LPCTSTR  pszValueName,
LPDWORD  pdwValue 
)
inline

Definition at line 61 of file cicreg.h.

62{
63 DWORD cbData = sizeof(DWORD);
64 return ::RegQueryValueEx(m_hKey, pszValueName, 0, NULL, (LPBYTE)pdwValue, &cbData);
65}
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DWORD
Definition: nt_native.h:44
unsigned char * LPBYTE
Definition: typedefs.h:53

Referenced by InitCUASFlag(), InitFromReg(), IsDeskBandFromReg(), CLangBarItemList::Load(), CDefCompFrameWindow::LoadPosition(), and TLS::NonEACompositionEnabled().

◆ QuerySz()

LSTATUS CicRegKey::QuerySz ( LPCTSTR  pszValueName,
LPTSTR  pszValue,
DWORD  cchValueMax 
)
inline

Definition at line 84 of file cicreg.h.

85{
86 return _cicRegKey_QuerySz(*this, pszValueName, pszValue, cchValueMax);
87}
EXTERN_C LSTATUS _cicRegKey_QuerySz(CicRegKey &self, LPCTSTR pszValueName, LPTSTR pszValue, DWORD cchValueMax)
Definition: cicreg.cpp:50

Referenced by GetHKLSubstitute(), GetKbdLayoutNameFromReg(), GetSpecialKLID(), InitCUASFlag(), and InitLangChangeHotKey().

◆ RecurseDeleteKey()

LSTATUS CicRegKey::RecurseDeleteKey ( LPCTSTR  lpSubKey)
inline

Definition at line 113 of file cicreg.h.

114{
115 return _cicRegKey_RecurseDeleteKey(*this, lpSubKey);
116}
EXTERN_C LSTATUS _cicRegKey_RecurseDeleteKey(CicRegKey &self, LPCTSTR lpSubKey)
Definition: cicreg.cpp:60

Referenced by _cicRegKey_RecurseDeleteKey(), CLangBarItemList::Clear(), CLangBarItemList::SaveItem(), and TF_UnregisterLangBarAddIn().

◆ SetDword()

LSTATUS CicRegKey::SetDword ( LPCTSTR  pszValueName,
DWORD  dwValue 
)
inline

Definition at line 67 of file cicreg.h.

68{
69 return ::RegSetValueEx(m_hKey, pszValueName, 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(dwValue));
70}
#define REG_DWORD
Definition: sdbapi.c:596

Referenced by CLangBarItemList::SaveItem(), CDefCompFrameWindow::SavePosition(), CTipbarWnd::SavePosition(), SetDeskBandToReg(), and TF_RegisterLangBarAddIn().

◆ SetSz()

LSTATUS CicRegKey::SetSz ( LPCTSTR  pszValueName,
LPCTSTR  pszValue 
)
inline

Definition at line 72 of file cicreg.h.

73{
74 DWORD cbValue = (lstrlen(pszValue) + 1) * sizeof(TCHAR);
75 return ::RegSetValueEx(m_hKey, pszValueName, 0, REG_SZ, (LPBYTE)pszValue, cbValue);
76}
#define REG_SZ
Definition: layer.c:22
#define lstrlen
Definition: winbase.h:3876
char TCHAR
Definition: xmlstorage.h:189

◆ SetSzW()

LSTATUS CicRegKey::SetSzW ( LPCWSTR  pszValueName,
LPCWSTR  pszValue 
)
inline

Definition at line 78 of file cicreg.h.

79{
80 DWORD cbValue = (lstrlenW(pszValue) + 1) * sizeof(WCHAR);
81 return ::RegSetValueExW(m_hKey, pszValueName, 0, REG_SZ, (LPBYTE)pszValue, cbValue);
82}
#define lstrlenW
Definition: compat.h:750
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by TF_RegisterLangBarAddIn().

Member Data Documentation

◆ m_hKey


The documentation for this class was generated from the following file: