* @brief Opens key in given path. * @param [in] hKeyRoot Root key to open, HKLM, HKCU.. * @param [in] pszPath Path to actual registry key to access. * @param [in] regsam Registry access parameter. * @return ERROR_SUCCESS or error value. */
| 77 | * @return ERROR_SUCCESS or error value. |
| 78 | */ |
| 79 | LONG CRegKeyEx::OpenNoCreateWithAccess(HKEY hKeyRoot, LPCTSTR pszPath, REGSAM regsam) |
| 80 | { |
| 81 | Close(); |
| 82 | |
| 83 | m_sPath = pszPath; |
| 84 | |
| 85 | return RegOpenKeyEx (hKeyRoot, pszPath, 0L, regsam, &m_hKey); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * @brief Opens registry key from HKEY_LOCAL_MACHINE for reading. |