BOOL DeletePortW( LPWSTR pName, HWND hWnd, LPWSTR pPortName ) { if( DeleteRegistryValue( szRegPortNames, pPortName ) == NO_ERROR ) return DeletePortEntry( pPortName ); else return FALSE; }
// Writes to HKCU\\SOFTWARE\\imc AG\\LECTURNITY\\<szSubkey>: szValue bool LRegistry::WriteSettingsString(LPCTSTR szSubkey, LPCTSTR szValue, const _TCHAR *tszString, bool bForAll) { TCHAR szKey[512]; CreateRegistryKey(szSubkey, szKey); bool success = false; if (bForAll) { success = WriteStringRegistryEntry(HKEY_LOCAL_MACHINE, szKey, szValue, tszString); if (success) DeleteRegistryValue(HKEY_CURRENT_USER, szKey, szValue); } if (!success) { success = WriteStringRegistryEntry(HKEY_CURRENT_USER, szKey, szValue, tszString); } return success; }
// Writes to HKCU\\SOFTWARE\\imc AG\\LECTURNITY\\<szSubkey>: szValue bool LRegistry::WriteSettingsDword(LPCTSTR szSubkey, LPCTSTR szValue, DWORD dwEntry, bool bForAll) { TCHAR szKey[512]; CreateRegistryKey(szSubkey, szKey); bool success = false; if (bForAll) { success = WriteDwordRegistryEntry(HKEY_LOCAL_MACHINE, szKey, szValue, dwEntry); if (success) DeleteRegistryValue(HKEY_CURRENT_USER, szKey, szValue); } if (!success) { success = WriteDwordRegistryEntry(HKEY_CURRENT_USER, szKey, szValue, dwEntry); } return success; }
// Writes to HKCU\\SOFTWARE\\imc AG\\LECTURNITY\\<szSubkey>: szValue bool LRegistry::WriteSettingsBinary(LPCTSTR szSubkey, LPCTSTR szValue, const char *pData, DWORD dwSize, bool bForAll) { TCHAR szKey[512]; CreateRegistryKey(szSubkey, szKey); bool success = false; if (bForAll) { success = WriteBinaryRegistryEntry(HKEY_LOCAL_MACHINE, szKey, szValue, pData, dwSize); if (success) DeleteRegistryValue(HKEY_CURRENT_USER, szKey, szValue); } if (!success) { success = WriteBinaryRegistryEntry(HKEY_CURRENT_USER, szKey, szValue, pData, dwSize); } return success; }
BOOL RegistryVar::Delete() // REG #018 { // REG #018 CString name; // REG #018 name.LoadString(id); // REG #018 return DeleteRegistryValue(root, name); // REG #018 } // RegistryVar::Delete // REG #018