| 240 | } |
| 241 | |
| 242 | _Use_decl_annotations_ |
| 243 | LSTATUS RegistryKey::QueryQWORDValue(LPCTSTR pszValueName, ULONGLONG& qwValue) noexcept { |
| 244 | LONG lRes; |
| 245 | ULONG nBytes; |
| 246 | DWORD dwType; |
| 247 | |
| 248 | ATLASSERT(_hKey); |
| 249 | |
| 250 | nBytes = sizeof(ULONGLONG); |
| 251 | lRes = ::RegQueryValueEx(_hKey, pszValueName, nullptr, &dwType, |
| 252 | reinterpret_cast<LPBYTE>(&qwValue), &nBytes); |
| 253 | if (lRes != ERROR_SUCCESS) |
| 254 | return lRes; |
| 255 | if (dwType != REG_DWORD) |
| 256 | return ERROR_INVALID_DATA; |
| 257 | |
| 258 | return ERROR_SUCCESS; |
| 259 | } |
| 260 | |
| 261 | _Use_decl_annotations_ |
| 262 | LSTATUS RegistryKey::DeleteValue(LPCTSTR lpszValue) noexcept { |