ReactOS  0.4.15-dev-3303-g1ade494
SettingsFieldString Class Reference
Inheritance diagram for SettingsFieldString:
Collaboration diagram for SettingsFieldString:

Public Member Functions

 SettingsFieldString (WCHAR *pString, ULONG cchLen, LPCWSTR szRegName)
 
virtual BOOL Save (CRegKey &key) override
 
virtual BOOL Load (CRegKey &key) override
 
- Public Member Functions inherited from SettingsField
virtual ~SettingsField ()
 

Private Attributes

WCHARm_pStringStore
 
ULONG m_StringLen
 
LPCWSTR m_RegName
 

Detailed Description

Definition at line 78 of file settings.cpp.

Constructor & Destructor Documentation

◆ SettingsFieldString()

SettingsFieldString::SettingsFieldString ( WCHAR pString,
ULONG  cchLen,
LPCWSTR  szRegName 
)
inline

Definition at line 81 of file settings.cpp.

82  : m_pStringStore(pString), m_StringLen(cchLen), m_RegName(szRegName)
83  {
84  }
FxString * pString
WCHAR * m_pStringStore
Definition: settings.cpp:98

Member Function Documentation

◆ Load()

virtual BOOL SettingsFieldString::Load ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 90 of file settings.cpp.

91  {
92  ULONG nChar = m_StringLen - 1; // make sure the terminating L'\0'
93  LONG lResult = key.QueryStringValue(m_RegName, m_pStringStore, &nChar);
94  return lResult == ERROR_SUCCESS;
95  }
#define ERROR_SUCCESS
Definition: deptool.c:10
long LONG
Definition: pedump.c:60
WCHAR * m_pStringStore
Definition: settings.cpp:98
unsigned int ULONG
Definition: retypes.h:1
Definition: path.c:41

◆ Save()

virtual BOOL SettingsFieldString::Save ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 86 of file settings.cpp.

87  {
88  return key.SetStringValue(m_RegName, m_pStringStore) == ERROR_SUCCESS;
89  }
#define ERROR_SUCCESS
Definition: deptool.c:10
WCHAR * m_pStringStore
Definition: settings.cpp:98
Definition: path.c:41

Member Data Documentation

◆ m_pStringStore

WCHAR* SettingsFieldString::m_pStringStore
private

Definition at line 98 of file settings.cpp.

Referenced by Load(), and Save().

◆ m_RegName

LPCWSTR SettingsFieldString::m_RegName
private

Definition at line 100 of file settings.cpp.

Referenced by Load(), and Save().

◆ m_StringLen

ULONG SettingsFieldString::m_StringLen
private

Definition at line 99 of file settings.cpp.

Referenced by Load().


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