Esempio n. 1
0
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;
}
Esempio n. 2
0
// set the full key name
void wxRegKey::SetName(const wxString& strKey)
{
  Close();

  m_strKey = strKey;
  m_hRootKey = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey;
}
Esempio n. 3
0
wxRegKey::wxRegKey(const wxString& strKey, WOW64ViewMode viewMode)
    : m_strKey(strKey), m_viewMode(viewMode)
{
  m_hRootKey  = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey;

  Init();
}
Esempio n. 4
0
wxRegKey::wxRegKey(const wxString& strKey) : m_strKey(strKey)
{
  m_hRootKey  = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey;

  Init();
}