Changeset 63


Ignore:
Timestamp:
10/15/2007 11:42:53 AM (7 years ago)
Author:
lowjoel
Message:

Multiple eraser file lock resolver instances won't overwrite each other now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EraserDll/FileLockResolver.cpp

    r61 r63  
    203203    } 
    204204 
    205     CString strPath(CString("\"") + LAUNCHER + "\" " + szResolveLock + " \"" + 
    206         m_strLockFileList + "\" -method " + method); 
     205    CString cmdLine(CString("\"") + LAUNCHER + "\" " + szResolveLock + " \"" + 
     206        m_strLockFileList + "\" -method " + method + " -queue"); 
    207207 
    208208    extern bool no_registry; 
     
    212212        if (ERROR_SUCCESS == key.Open(HKEY_LOCAL_MACHINE, RUNONCE)) 
    213213        { 
    214             key.SetStringValue(LAUNCHER, strPath); 
     214            // Find an unused eraser launcher ID 
     215            int i = 0; 
     216            ULONG bufSiz = 0; 
     217            const char* KeyName = "EraserRestartErase (%i)"; 
     218            char KeyNameBuf[64]; 
     219            do 
     220                sprintf(KeyNameBuf, KeyName, ++i); 
     221            while (key.QueryStringValue(KeyNameBuf, NULL, &bufSiz) == ERROR_SUCCESS); 
     222 
     223            // Then save to registry 
     224            key.SetStringValue(KeyNameBuf, cmdLine); 
    215225            m_strLockFileList = ""; 
    216226            m_iMethod = 0; 
Note: See TracChangeset for help on using the changeset viewer.