ReactOS 0.4.15-dev-7704-gc07eb9f
ACLCustomMRU.cpp File Reference
#include "precomp.h"
Include dependency graph for ACLCustomMRU.cpp:

Go to the source code of this file.

Macros

#define TYPED_URLS_KEY   L"Software\\Microsoft\\Internet Explorer\\TypedURLs"
 

Functions

static LSTATUS RegQueryCStringW (CRegKey &key, LPCWSTR pszValueName, CStringW &str)
 

Macro Definition Documentation

◆ TYPED_URLS_KEY

#define TYPED_URLS_KEY   L"Software\\Microsoft\\Internet Explorer\\TypedURLs"

Definition at line 11 of file ACLCustomMRU.cpp.

Function Documentation

◆ RegQueryCStringW()

static LSTATUS RegQueryCStringW ( CRegKey key,
LPCWSTR  pszValueName,
CStringW str 
)
static

Definition at line 101 of file ACLCustomMRU.cpp.

102{
103 // Check type and size
104 DWORD dwType, cbData;
105 LSTATUS ret = key.QueryValue(pszValueName, &dwType, NULL, &cbData);
106 if (ret != ERROR_SUCCESS)
107 return ret;
108 if (dwType != REG_SZ && dwType != REG_EXPAND_SZ)
109 return ERROR_INVALID_DATA;
110
111 // Allocate buffer
112 LPWSTR pszBuffer = str.GetBuffer(cbData / sizeof(WCHAR) + 1);
113 if (pszBuffer == NULL)
114 return ERROR_OUTOFMEMORY;
115
116 // Get the data
117 ret = key.QueryValue(pszValueName, NULL, pszBuffer, &cbData);
118
119 // Release buffer
120 str.ReleaseBuffer();
121 return ret;
122}
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define ERROR_SUCCESS
Definition: deptool.c:10
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define NULL
Definition: types.h:112
unsigned long DWORD
Definition: ntddk_ex.h:95
#define REG_SZ
Definition: layer.c:22
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
const WCHAR * str
Definition: copy.c:22
int ret
#define ERROR_INVALID_DATA
Definition: winerror.h:116
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by CACLCustomMRU::LoadTypedURLs().