Tries to load a DWORD value from the registry key. @param p_pValueName Name of value to load. @param p_rValue Where to store value. @return Result code (ERROR_SUCCESS if it worked).
| 111 | // @return Result code (ERROR_SUCCESS if it worked). |
| 112 | // |
| 113 | long UserOverrideableRegKey::QueryDWORDValue(const wchar_t* const p_pValueName, |
| 114 | DWORD& p_rValue) const |
| 115 | { |
| 116 | long res = ERROR_FILE_NOT_FOUND; |
| 117 | if (!Locked()) { |
| 118 | res = m_UserKey.QueryDWORDValue(p_pValueName, p_rValue); |
| 119 | } else { |
| 120 | res = ERROR_ACCESS_DENIED; |
| 121 | } |
| 122 | if (res != ERROR_SUCCESS && m_GlobalKey.Valid()) { |
| 123 | res = m_GlobalKey.QueryDWORDValue(p_pValueName, p_rValue); |
| 124 | } |
| 125 | return res; |
| 126 | } |
| 127 | |
| 128 | // |
| 129 | // Tries to load a QWORD value from the registry key. |