ReactOS 0.4.15-dev-7846-g8ba6c66
registry.cpp File Reference
#include "precomp.h"
#include <winreg.h>
#include <wincon.h>
#include <shlobj.h>
Include dependency graph for registry.cpp:

Go to the source code of this file.

Functions

static void ReadDWORD (CRegKey &key, LPCWSTR lpName, DWORD &dwValue)
 
static void ReadString (CRegKey &key, LPCWSTR lpName, CStringW &strValue, LPCWSTR lpDefault=L"")
 

Variables

RegistrySettings registrySettings
 

Function Documentation

◆ ReadDWORD()

static void ReadDWORD ( CRegKey key,
LPCWSTR  lpName,
DWORD dwValue 
)
static

Definition at line 18 of file registry.cpp.

19{
20 DWORD dwTemp;
21 if (key.QueryDWORDValue(lpName, dwTemp) == ERROR_SUCCESS)
22 dwValue = dwTemp;
23}
#define ERROR_SUCCESS
Definition: deptool.c:10
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: copy.c:22
_In_ LPCSTR lpName
Definition: winbase.h:2789

Referenced by RegistrySettings::Load().

◆ ReadString()

static void ReadString ( CRegKey key,
LPCWSTR  lpName,
CStringW strValue,
LPCWSTR  lpDefault = L"" 
)
static

Definition at line 25 of file registry.cpp.

26{
27 CStringW strTemp;
28 ULONG nChars = MAX_PATH;
29 LPWSTR psz = strTemp.GetBuffer(nChars);
30 LONG error = key.QueryStringValue(lpName, psz, &nChars);
31 strTemp.ReleaseBuffer();
32
33 if (error == ERROR_SUCCESS)
34 strValue = strTemp;
35 else
36 strValue = lpDefault;
37}
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
#define MAX_PATH
Definition: compat.h:34
#define error(str)
Definition: mkdosfs.c:1605
long LONG
Definition: pedump.c:60
uint32_t ULONG
Definition: typedefs.h:59
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by RegistrySettings::Load().

Variable Documentation

◆ registrySettings