ReactOS 0.4.16-dev-91-g764881a
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 ()
 
virtual BOOL Save (CRegKey &key)=0
 
virtual BOOL Load (CRegKey &key)=0
 

Private Attributes

WCHARm_pStringStore
 
ULONG m_StringLen
 
LPCWSTR m_RegName
 

Detailed Description

Definition at line 86 of file settings.cpp.

Constructor & Destructor Documentation

◆ SettingsFieldString()

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

Definition at line 89 of file settings.cpp.

90 : m_pStringStore(pString), m_StringLen(cchLen), m_RegName(szRegName)
91 {
92 }
WCHAR * m_pStringStore
Definition: settings.cpp:108
FxString * pString

Member Function Documentation

◆ Load()

virtual BOOL SettingsFieldString::Load ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 100 of file settings.cpp.

101 {
102 ULONG nChar = m_StringLen - 1; // make sure the terminating L'\0'
103 LONG lResult = key.QueryStringValue(m_RegName, m_pStringStore, &nChar);
104 return lResult == ERROR_SUCCESS;
105 }
#define ERROR_SUCCESS
Definition: deptool.c:10
long LONG
Definition: pedump.c:60
Definition: copy.c:22
uint32_t ULONG
Definition: typedefs.h:59

◆ Save()

virtual BOOL SettingsFieldString::Save ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 95 of file settings.cpp.

96 {
97 return key.SetStringValue(m_RegName, m_pStringStore) == ERROR_SUCCESS;
98 }

Member Data Documentation

◆ m_pStringStore

WCHAR* SettingsFieldString::m_pStringStore
private

Definition at line 108 of file settings.cpp.

Referenced by Load(), and Save().

◆ m_RegName

LPCWSTR SettingsFieldString::m_RegName
private

Definition at line 110 of file settings.cpp.

Referenced by Load(), and Save().

◆ m_StringLen

ULONG SettingsFieldString::m_StringLen
private

Definition at line 109 of file settings.cpp.

Referenced by Load().


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