ReactOS  0.4.15-dev-3217-gc6d1646
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 DWORD ReadDWORD (CRegKey &key, LPCTSTR lpName, DWORD &dwValue, BOOL bCheckForDef)
 
static void ReadFileHistory (CRegKey &key, LPCTSTR lpName, CString &strFile)
 

Function Documentation

◆ ReadDWORD()

static DWORD ReadDWORD ( CRegKey key,
LPCTSTR  lpName,
DWORD dwValue,
BOOL  bCheckForDef 
)
static

Definition at line 18 of file registry.cpp.

19 {
20  DWORD dwPrev = dwValue;
21 
22  if (key.QueryDWORDValue(lpName, dwValue) != ERROR_SUCCESS || (bCheckForDef && dwValue == 0))
23  dwValue = dwPrev;
24 
25  return dwPrev;
26 }
#define ERROR_SUCCESS
Definition: deptool.c:10
_In_ LPCSTR lpName
Definition: winbase.h:2768
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: path.c:41

Referenced by RegistrySettings::Load().

◆ ReadFileHistory()

static void ReadFileHistory ( CRegKey key,
LPCTSTR  lpName,
CString strFile 
)
static

Definition at line 28 of file registry.cpp.

29 {
30  ULONG nChars = MAX_PATH;
31  LPTSTR szFile = strFile.GetBuffer(nChars);
32  if (key.QueryStringValue(lpName, szFile, &nChars) != ERROR_SUCCESS)
33  szFile[0] = '\0';
34  strFile.ReleaseBuffer();
35 }
#define ERROR_SUCCESS
Definition: deptool.c:10
_In_ LPCSTR lpName
Definition: winbase.h:2768
CHAR * LPTSTR
Definition: xmlstorage.h:192
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:372
#define MAX_PATH
Definition: compat.h:34
unsigned int ULONG
Definition: retypes.h:1
Definition: path.c:41

Referenced by RegistrySettings::Load().