MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / QueryDWORDValue

Method QueryDWORDValue

WinArk/RegistryKey.cpp:222–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222_Use_decl_annotations_
223LSTATUS RegistryKey::QueryDWORDValue(LPCTSTR pszValueName, DWORD& dwValue) noexcept {
224 LONG lRes;
225 ULONG nBytes;
226 DWORD dwType;
227
228 ATLASSERT(_hKey != NULL);
229
230 nBytes = sizeof(DWORD);
231 lRes = ::RegQueryValueEx(_hKey, pszValueName, nullptr, &dwType, reinterpret_cast<LPBYTE>(&dwValue),
232 &nBytes);
233
234 if (lRes != ERROR_SUCCESS)
235 return lRes;
236 if (dwType != REG_DWORD)
237 return ERROR_INVALID_DATA;
238
239 return ERROR_SUCCESS;
240}
241
242_Use_decl_annotations_
243LSTATUS RegistryKey::QueryQWORDValue(LPCTSTR pszValueName, ULONGLONG& qwValue) noexcept {

Callers 1

GetDataAsStringMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected