| 220 | } |
| 221 | |
| 222 | _Use_decl_annotations_ |
| 223 | LSTATUS 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_ |
| 243 | LSTATUS RegistryKey::QueryQWORDValue(LPCTSTR pszValueName, ULONGLONG& qwValue) noexcept { |