示例#1
0
文件: lmmon.c 项目: mingpen/OpenNT
BOOL
DeletePortW(
    LPWSTR   pName,
    HWND    hWnd,
    LPWSTR   pPortName
)
{
    if( DeleteRegistryValue( szRegPortNames, pPortName ) == NO_ERROR )
        return DeletePortEntry( pPortName );
    else
        return FALSE;
}
示例#2
0
// 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;
}
示例#3
0
// 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;
}
示例#4
0
// 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;
}
示例#5
0
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