PRInt32 result = ReplaceFileNow( replacementFile, doomedFile );
PRInt32 result = ReplaceFileNow( aReplacementFile, aDoomedFile );
PRInt32 ReplaceFileNowOrSchedule(nsIFile* replacementFile, nsIFile* doomedFile, PRInt32 aMode){    PRInt32 result = ReplaceFileNow( replacementFile, doomedFile );    if ( result == nsInstall::ACCESS_DENIED )    {        // if we couldn't replace the file schedule it for later#ifdef _WINDOWS        if ( (aMode & WIN_SYSTEM_FILE) &&              (ReplaceWindowsSystemFile(replacementFile, doomedFile) == 0) )                return nsInstall::REBOOT_NEEDED;#endif        RKEY    listkey;        RKEY    filekey;        HREG    reg;        REGERR  err;        nsCAutoString regFilePath;        GetRegFilePath(regFilePath);        if ( REGERR_OK == NR_RegOpen((char*)regFilePath.get(), &reg) )         {            err = NR_RegAddKey( reg, ROOTKEY_PRIVATE, REG_REPLACE_LIST_KEY, &listkey );            if ( err == REGERR_OK )             {                char     valname[20];                REGERR   err2;                err = NR_RegGetUniqueName( reg, valname, sizeof(valname) );                if ( err == REGERR_OK )                {                    err = NR_RegAddKey( reg, listkey, valname, &filekey );                    if ( REGERR_OK == err )                    {                        nsCAutoString srcowner;                        nsCAutoString destowner;                        nsresult rv = GetPersistentStringFromSpec(replacementFile, srcowner);                        nsresult rv2 = GetPersistentStringFromSpec(doomedFile, destowner);                        if ( NS_SUCCEEDED(rv) && NS_SUCCEEDED(rv2) )                        {                            const char *fsrc  = srcowner.get();                            const char *fdest = destowner.get();                            err = NR_RegSetEntry( reg, filekey,                                                   REG_REPLACE_SRCFILE,                                                  REGTYPE_ENTRY_BYTES,                                                   (void*)fsrc,                                                   strlen(fsrc)+sizeof('\0'));                            err2 = NR_RegSetEntry(reg, filekey,                                                  REG_REPLACE_DESTFILE,                                                  REGTYPE_ENTRY_BYTES,                                                  (void*)fdest,                                                  strlen(fdest)+sizeof('\0'));                            if ( err == REGERR_OK && err2 == REGERR_OK )                            {                                result = nsInstall::REBOOT_NEEDED;                                nsSoftwareUpdate::NeedCleanup();                            }                            else                                NR_RegDeleteKey( reg, listkey, valname );                        }                    }                }            }            NR_RegClose(reg);        }    }    return result;}