CNCSPrefsWin::CNCSPrefsKeyWin *CNCSPrefsWin::CNCSPrefsKeyWin::OpenKey( CNCSMutex *pmMutex, HKEY hBaseKey, CNCSString sSubKey, bool bCreate ) { HKEY hKey = NULL; DWORD disp; if(RegOpenKeyEx(hBaseKey, sSubKey.c_str(), 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) { return new CNCSPrefsKeyWin( pmMutex, ExtractKeyName(sSubKey), hKey ); } else if( bCreate ) { if (RegCreateKeyEx( hBaseKey, sSubKey.c_str(), (DWORD)0, (NCSTChar*)NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &disp ) == ERROR_SUCCESS) { return new CNCSPrefsKeyWin( pmMutex, ExtractKeyName(sSubKey), hKey ); } } return NULL; }
// set the full key name void wxRegKey::SetName(const wxString& strKey) { Close(); m_strKey = strKey; m_hRootKey = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey; }
wxRegKey::wxRegKey(const wxString& strKey, WOW64ViewMode viewMode) : m_strKey(strKey), m_viewMode(viewMode) { m_hRootKey = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey; Init(); }
wxRegKey::wxRegKey(const wxString& strKey) : m_strKey(strKey) { m_hRootKey = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey; Init(); }