Tries to load a GUID value from the registry key (stored as a string). @param p_pValueName Name of value to load. @param p_rValue Where to store value. @return Result code (ERROR_SUCCESS if it worked).
| 155 | // @return Result code (ERROR_SUCCESS if it worked). |
| 156 | // |
| 157 | long UserOverrideableRegKey::QueryGUIDValue(const wchar_t* const p_pValueName, |
| 158 | GUID& p_rValue) const |
| 159 | { |
| 160 | long res = ERROR_FILE_NOT_FOUND; |
| 161 | if (!Locked()) { |
| 162 | res = m_UserKey.QueryGUIDValue(p_pValueName, p_rValue); |
| 163 | } else { |
| 164 | res = ERROR_ACCESS_DENIED; |
| 165 | } |
| 166 | if (res != ERROR_SUCCESS && m_GlobalKey.Valid()) { |
| 167 | res = m_GlobalKey.QueryGUIDValue(p_pValueName, p_rValue); |
| 168 | } |
| 169 | return res; |
| 170 | } |
| 171 | |
| 172 | // |
| 173 | // Tries to load a value from the registry key. |