Back to index

lightning-sunbird  0.9+nobinonly
logging.c
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is Mozilla Navigator.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corp.
00018  * Portions created by the Initial Developer are Copyright (C) 2001
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *   Sean Su <ssu@netscape.com>
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "extern.h"
00039 #include "logging.h"
00040 #include "extra.h"
00041 #include "ifuncns.h"
00042 #include "xpi.h"
00043 
00044 #define E_USER_CANCEL         -813
00045 #define SECTION_EXIT_STATUS   "Exit Status"
00046 #define KEY_STATUS            "Status"
00047 
00048 int AppendToGlobalMessageStream(char *szInfo)
00049 {
00050   DWORD dwInfoLen = lstrlen(szInfo);
00051   DWORD dwMessageLen;
00052 
00053   if(gErrorMessageStream.bEnabled && gErrorMessageStream.szMessage)
00054   {
00055     dwMessageLen = lstrlen(gErrorMessageStream.szMessage);
00056     if((dwInfoLen + dwMessageLen) >= gErrorMessageStream.dwMessageBufSize)
00057     {
00058       if(NS_GlobalReAlloc(&gErrorMessageStream.szMessage,
00059                           gErrorMessageStream.dwMessageBufSize,
00060                           dwInfoLen + dwMessageLen + MAX_BUF_TINY) == NULL)
00061         return(WIZ_OUT_OF_MEMORY);
00062 
00063       gErrorMessageStream.dwMessageBufSize = dwInfoLen +
00064                                              dwMessageLen +
00065                                              MAX_BUF_TINY;
00066     }
00067 
00068     lstrcat(gErrorMessageStream.szMessage, szInfo);
00069   }
00070 
00071   return(WIZ_OK);
00072 }
00073 
00074 void LogISTime(int iType)
00075 {
00076   char       szBuf[MAX_BUF];
00077   char       szTime[MAX_BUF_TINY];
00078   char       szDate[MAX_BUF_TINY];
00079   SYSTEMTIME stLocalTime;
00080 
00081   GetLocalTime(&stLocalTime);
00082   GetTimeFormat(LOCALE_NEUTRAL,
00083                 LOCALE_NOUSEROVERRIDE,
00084                 &stLocalTime,
00085                 NULL,
00086                 szTime,
00087                 sizeof(szTime));
00088   GetDateFormat(LOCALE_NEUTRAL,
00089                 LOCALE_NOUSEROVERRIDE,
00090                 &stLocalTime,
00091                 NULL,
00092                 szDate,
00093                 sizeof(szDate));
00094 
00095   if(iType == W_START)
00096     wsprintf(szBuf, "Start Log: %s - %s\n", szDate, szTime);
00097   else
00098     wsprintf(szBuf, "End Log: %s - %s\n", szDate, szTime);
00099 
00100   UpdateInstallStatusLog(szBuf);
00101 }
00102 
00103 void LogISProductInfo(void)
00104 {
00105   char szBuf[MAX_BUF];
00106 
00107   wsprintf(szBuf, "\n    Product Info:\n");
00108   UpdateInstallStatusLog(szBuf);
00109 
00110   switch(sgProduct.mode)
00111   {
00112     case SILENT:
00113       wsprintf(szBuf, "        Install mode: Silent\n");
00114       break;
00115     case AUTO:
00116       wsprintf(szBuf, "        Install mode: Auto\n");
00117       break;
00118     default:
00119       wsprintf(szBuf, "        Install mode: Normal\n");
00120       break;
00121   }
00122   UpdateInstallStatusLog(szBuf);
00123 
00124   wsprintf(szBuf, "        Company name: %s\n        Product name (external): %s\n        Product name (internal): %s\n        UserAgent: %s\n        Alternate search path: %s\n",
00125            sgProduct.szCompanyName,
00126            sgProduct.szProductName,
00127            sgProduct.szProductNameInternal,
00128            sgProduct.szUserAgent,
00129            sgProduct.szAlternateArchiveSearchPath);
00130   UpdateInstallStatusLog(szBuf);
00131 }
00132 
00133 void LogISDestinationPath(void)
00134 {
00135   char szBuf[MAX_BUF];
00136 
00137   wsprintf(szBuf,
00138            "\n    Destination Path:\n        Main: %s\n        SubPath: %s\n",
00139            sgProduct.szPath,
00140            sgProduct.szSubPath);
00141   UpdateInstallStatusLog(szBuf);
00142 }
00143 
00144 void LogISShared(void)
00145 {
00146   char szBuf[MAX_BUF];
00147 
00148   if(sgProduct.bSharedInst == TRUE)
00149     wsprintf(szBuf,"\n    Shared Installation:  TRUE\n");
00150   UpdateInstallStatusLog(szBuf);
00151 }
00152 
00153 void LogISSetupType(void)
00154 {
00155   char szBuf[MAX_BUF_TINY];
00156 
00157   switch(dwSetupType)
00158   {
00159     case ST_RADIO1:
00160       wsprintf(szBuf, "\n    Setup Type: %s\n",
00161                diSetupType.stSetupType1.szDescriptionShort);
00162       break;
00163 
00164     default:
00165       wsprintf(szBuf, "\n    Setup Type: %s\n",
00166                diSetupType.stSetupType0.szDescriptionShort);
00167       break;
00168   }
00169 
00170   UpdateInstallStatusLog(szBuf);
00171 }
00172 
00173 void LogISComponentsSelected(void)
00174 {
00175   char szBuf[MAX_BUF_TINY];
00176   siC  *siCNode;
00177   BOOL bFoundComponentSelected;
00178 
00179   wsprintf(szBuf, "\n    Components selected:\n");
00180   UpdateInstallStatusLog(szBuf);
00181 
00182   bFoundComponentSelected = FALSE;
00183   siCNode = siComponents;
00184   do
00185   {
00186     if(siCNode == NULL)
00187       break;
00188 
00189     if(siCNode->dwAttributes & SIC_SELECTED)
00190     {
00191       if(!siCNode->bForceUpgrade)
00192         wsprintf(szBuf,
00193                  "        %s\n",
00194                  siCNode->szDescriptionShort);
00195       else
00196         wsprintf(szBuf,
00197                  "        %s (Required)\n",
00198                  siCNode->szDescriptionShort);
00199 
00200       UpdateInstallStatusLog(szBuf);
00201       bFoundComponentSelected = TRUE;
00202     }
00203 
00204     siCNode = siCNode->Next;
00205   } while((siCNode != NULL) && (siCNode != siComponents));
00206 
00207   if(!bFoundComponentSelected)
00208   {
00209     wsprintf(szBuf, "        none\n");
00210     UpdateInstallStatusLog(szBuf);
00211   }
00212 }
00213 
00214 void LogISComponentsToDownload(void)
00215 {
00216   char szBuf[MAX_BUF_TINY];
00217   char szArchivePath[MAX_BUF_MEDIUM];
00218   siC  *siCNode;
00219   BOOL bFoundComponentSelected;
00220   BOOL bFoundComponentsToDownload;
00221 
00222   wsprintf(szBuf, "\n    Components to download:\n");
00223   UpdateInstallStatusLog(szBuf);
00224 
00225   bFoundComponentSelected = FALSE;
00226   bFoundComponentsToDownload = FALSE;
00227   siCNode = siComponents;
00228   do
00229   {
00230     if(siCNode == NULL)
00231       break;
00232 
00233     if(siCNode->dwAttributes & SIC_SELECTED)
00234     {
00235 
00236       if(LocateJar(siCNode,
00237                    szArchivePath,
00238                    sizeof(szArchivePath),
00239                    gbPreviousUnfinishedDownload) == AP_NOT_FOUND)
00240       {
00241         wsprintf(szBuf,
00242                  "        %s will be downloaded\n",
00243                  siCNode->szDescriptionShort);
00244         bFoundComponentsToDownload = TRUE;
00245       }
00246       else
00247         wsprintf(szBuf,
00248                  "        %s found: %s\n",
00249                  siCNode->szDescriptionShort,
00250                  szArchivePath);
00251 
00252       UpdateInstallStatusLog(szBuf);
00253       bFoundComponentSelected = TRUE;
00254     }
00255 
00256     siCNode = siCNode->Next;
00257   } while((siCNode != NULL) && (siCNode != siComponents));
00258 
00259   if(!bFoundComponentSelected)
00260   {
00261     wsprintf(szBuf, "        none\n");
00262     UpdateInstallStatusLog(szBuf);
00263   }
00264   if(!bFoundComponentsToDownload)
00265   {
00266     wsprintf(szBuf, "        **\n        ** All components have been found locally.  No components will be downloaded.\n        **\n");
00267     UpdateInstallStatusLog(szBuf);
00268   }
00269 }
00270 
00271 void LogISDownloadProtocol(DWORD dwProtocolType)
00272 {
00273   char szBuf[MAX_BUF];
00274   char szProtocolType[MAX_BUF];
00275 
00276   switch(dwProtocolType)
00277   {
00278     case UP_HTTP:
00279       lstrcpy(szProtocolType, "HTTP");
00280       break;
00281 
00282     default:
00283       lstrcpy(szProtocolType, "FTP");
00284       break;
00285   }
00286 
00287   wsprintf(szBuf, "\n    Download protocol: %s\n", szProtocolType);
00288   UpdateInstallStatusLog(szBuf);
00289 }
00290 
00291 void LogISDownloadStatus(char *szStatus, char *szFailedFile)
00292 {
00293   char szBuf[MAX_BUF];
00294   siC   *siCObject = NULL;
00295   DWORD dwIndex;
00296 
00297   if(szFailedFile)
00298     wsprintf(szBuf,
00299              "\n    Download status: %s\n          file: %s\n\n",
00300              szStatus,
00301              szFailedFile);
00302   else
00303     wsprintf(szBuf,
00304              "\n    Download status: %s\n",
00305              szStatus);
00306   UpdateInstallStatusLog(szBuf);
00307 
00308   dwIndex = 0;
00309   siCObject = SiCNodeGetObject(dwIndex, TRUE, AC_ALL);
00310   while(siCObject)
00311   {
00312     if(siCObject->dwAttributes & SIC_SELECTED)
00313     {
00314       wsprintf(szBuf, "        %s: NetRetries:%d, CRCRetries:%d, NetTimeOuts:%d\n",
00315                siCObject->szDescriptionShort,
00316                siCObject->iNetRetries,
00317                siCObject->iCRCRetries,
00318                siCObject->iNetTimeOuts);
00319       UpdateInstallStatusLog(szBuf);
00320     }
00321 
00322     ++dwIndex;
00323     siCObject = SiCNodeGetObject(dwIndex, TRUE, AC_ALL);
00324   }
00325 }
00326 
00327 void LogISComponentsFailedCRC(char *szList, int iWhen)
00328 {
00329   char szBuf[MAX_BUF];
00330 
00331   if(iWhen == W_STARTUP)
00332   {
00333     if(szList && (*szList != '\0'))
00334       wsprintf(szBuf,
00335                "\n    Components corrupted (startup):\n%s",
00336                szList);
00337     else
00338       wsprintf(szBuf,
00339                "\n    Components corrupted (startup):\n        none\n");
00340   }
00341   else
00342   {
00343     if(szList && (*szList != '\0'))
00344       wsprintf(szBuf,
00345                "\n    Components corrupted (download):\n%s",
00346                szList);
00347     else
00348       wsprintf(szBuf,
00349                "\n    Components corrupted (download):\n        none\n");
00350   }
00351 
00352   UpdateInstallStatusLog(szBuf);
00353 }
00354 
00355 void LogISXPInstall(int iWhen)
00356 {
00357   char szBuf[MAX_BUF];
00358 
00359   if(iWhen == W_START)
00360     wsprintf(szBuf, "\n    XPInstall Start\n");
00361   else
00362     wsprintf(szBuf, "    XPInstall End\n");
00363 
00364   UpdateInstallStatusLog(szBuf);
00365 }
00366 
00367 void LogISXPInstallComponent(char *szComponentName)
00368 {
00369   char szBuf[MAX_BUF];
00370 
00371   wsprintf(szBuf, "        %s", szComponentName);
00372   UpdateInstallStatusLog(szBuf);
00373 }
00374 
00375 void LogISXPInstallComponentResult(DWORD dwErrorNumber)
00376 {
00377   char szBuf[MAX_BUF];
00378   char szErrorString[MAX_BUF];
00379 
00380   GetErrorString(dwErrorNumber, szErrorString, sizeof(szErrorString));
00381   wsprintf(szBuf, ": %d %s\n", dwErrorNumber, szErrorString);
00382   UpdateInstallStatusLog(szBuf);
00383 }
00384 
00385 void LogISLaunchApps(int iWhen)
00386 {
00387   char szBuf[MAX_BUF];
00388 
00389   if(iWhen == W_START)
00390     wsprintf(szBuf, "\n    Launch Apps Start\n");
00391   else
00392     wsprintf(szBuf, "    Launch Apps End\n");
00393 
00394   UpdateInstallStatusLog(szBuf);
00395 }
00396 
00397 void LogISLaunchAppsComponent(char *szComponentName)
00398 {
00399   char szBuf[MAX_BUF];
00400 
00401   wsprintf(szBuf, "    launching %s\n", szComponentName);
00402   UpdateInstallStatusLog(szBuf);
00403 }
00404 
00405 void LogISLaunchAppsComponentUncompress(char *szComponentName, DWORD dwErr)
00406 {
00407   char szBuf[MAX_BUF];
00408 
00409   wsprintf(szBuf, "    uncompressing %s: %d\n", szComponentName, dwErr);
00410   UpdateInstallStatusLog(szBuf);
00411 }
00412 
00413 void LogISProcessXpcomFile(int iStatus, int iResult)
00414 {
00415   char szBuf[MAX_BUF];
00416 
00417   if(iStatus == LIS_SUCCESS)
00418     wsprintf(szBuf, "\n    Uncompressing Xpcom Succeeded: %d\n", iResult);
00419   else
00420     wsprintf(szBuf, "\n    Uncompressing Xpcom Failed: %d\n", iResult);
00421 
00422   UpdateInstallStatusLog(szBuf);
00423 }
00424 
00425 void LogISDiskSpace(dsN *dsnComponentDSRequirement)
00426 {
00427   ULONGLONG ullDSAvailable;
00428   dsN       *dsnTemp = NULL;
00429   char      szBuf[MAX_BUF];
00430   char      szDSRequired[MAX_BUF_TINY];
00431   char      szDSAvailable[MAX_BUF_TINY];
00432 
00433   if(dsnComponentDSRequirement != NULL)
00434   {
00435     wsprintf(szBuf, "\n    Disk Space Info:\n");
00436     UpdateInstallStatusLog(szBuf);
00437     dsnTemp = dsnComponentDSRequirement;
00438     do
00439     {
00440       if(!dsnTemp)
00441         break;
00442 
00443       ullDSAvailable = GetDiskSpaceAvailable(dsnTemp->szVDSPath);
00444       _ui64toa(ullDSAvailable, szDSAvailable, 10);
00445       _ui64toa(dsnTemp->ullSpaceRequired, szDSRequired, 10);
00446       wsprintf(szBuf,
00447                "             Path: %s\n         Required: %sKB\n        Available: %sKB\n",
00448                dsnTemp->szVDSPath,
00449                szDSRequired,
00450                szDSAvailable);
00451       UpdateInstallStatusLog(szBuf);
00452 
00453       dsnTemp = dsnTemp->Next;
00454     } while((dsnTemp != NULL) && (dsnTemp != dsnComponentDSRequirement));
00455   }
00456 }
00457 
00458 void LogISTurboMode(BOOL bTurboMode)
00459 {
00460   char szBuf[MAX_BUF];
00461 
00462   if(bTurboMode)
00463     wsprintf(szBuf, "\n    Turbo Mode: true\n");
00464   else
00465     wsprintf(szBuf, "\n    Turbo Mode: false\n");
00466 
00467   UpdateInstallStatusLog(szBuf);
00468 }
00469 
00470 void LogMSProductInfo(void)
00471 {
00472   char szBuf[MAX_BUF];
00473   char szOSType[MAX_BUF_TINY];
00474 
00475   GetOSTypeString(szOSType, sizeof(szOSType));
00476   if(*gSystemInfo.szExtraString != '\0')
00477     wsprintf(szBuf, "UserAgent=%s/%s (%s,%d.%d.%d,%s)",
00478              sgProduct.szProductName,
00479              sgProduct.szUserAgent,
00480              szOSType,
00481              gSystemInfo.dwMajorVersion,
00482              gSystemInfo.dwMinorVersion,
00483              gSystemInfo.dwBuildNumber,
00484              gSystemInfo.szExtraString);
00485   else
00486     wsprintf(szBuf, "UserAgent=%s/%s (%s,%d.%d.%d)",
00487              sgProduct.szProductName,
00488              sgProduct.szUserAgent,
00489              szOSType,
00490              gSystemInfo.dwMajorVersion,
00491              gSystemInfo.dwMinorVersion,
00492              gSystemInfo.dwBuildNumber);
00493 
00494   AppendToGlobalMessageStream(szBuf);
00495 }
00496 
00497 void LogMSDownloadProtocol(DWORD dwProtocolType)
00498 {
00499   char szMessageStream[MAX_BUF_TINY];
00500   char szProtocolType[MAX_BUF];
00501 
00502   switch(dwProtocolType)
00503   {
00504     case UP_HTTP:
00505       lstrcpy(szProtocolType, "HTTP");
00506       break;
00507 
00508     default:
00509       lstrcpy(szProtocolType, "FTP");
00510       break;
00511   }
00512 
00513   wsprintf(szMessageStream, "&DownloadProtocol=%s", szProtocolType);
00514   AppendToGlobalMessageStream(szMessageStream);
00515 }
00516 
00517 void LogMSDownloadStatus(int iDownloadStatus)
00518 {
00519   char szMessageStream[MAX_BUF_TINY];
00520 
00521   wsprintf(szMessageStream, "&DownloadStatus=%d", iDownloadStatus);
00522   AppendToGlobalMessageStream(szMessageStream);
00523   gErrorMessageStream.bSendMessage = TRUE;
00524 }
00525 
00526 void LogMSDownloadFileStatus(void)
00527 {
00528   siC   *siCObject = NULL;
00529   DWORD dwIndex;
00530   char  szMessageStream[MAX_BUF];
00531 
00532   ZeroMemory(szMessageStream, sizeof(szMessageStream));
00533   dwIndex = 0;
00534   siCObject = SiCNodeGetObject(dwIndex, TRUE, AC_ALL);
00535   while(siCObject)
00536   {
00537     if(siCObject->iNetRetries ||
00538        siCObject->iCRCRetries ||
00539        siCObject->iNetTimeOuts)
00540     {
00541       char szFileInfo[MAX_BUF_SMALL];
00542 
00543       wsprintf(szFileInfo,
00544                "&%s=%d,%d,%d",
00545                siCObject->szArchiveName,
00546                siCObject->iNetRetries,
00547                siCObject->iCRCRetries,
00548                siCObject->iNetTimeOuts);
00549 
00550       lstrcat(szMessageStream, szFileInfo);
00551     }
00552     ++dwIndex;
00553     siCObject = SiCNodeGetObject(dwIndex, TRUE, AC_ALL);
00554   }
00555 
00556   if(*szMessageStream != '\0')
00557     AppendToGlobalMessageStream(szMessageStream);
00558 }
00559 
00560 void LogMSXPInstallStatus(char *szFile, int iErr)
00561 {
00562   char szMessageStream[MAX_BUF];
00563   static BOOL bAlreadyLogged = FALSE;
00564 
00565   if(bAlreadyLogged)
00566     return;
00567 
00568   if(szFile)
00569     wsprintf(szMessageStream, "&XPInstallStatus=%d&XPInstallFile=%s", iErr, szFile);
00570   else
00571     wsprintf(szMessageStream, "&XPInstallStatus=%d", iErr);
00572 
00573   AppendToGlobalMessageStream(szMessageStream);
00574   bAlreadyLogged = TRUE;
00575   if((iErr != E_REBOOT) &&
00576     (((iErr == E_USER_CANCEL) &&
00577        !gErrorMessageStream.bShowConfirmation) ||
00578      ((iErr != E_USER_CANCEL) &&
00579       (iErr != WIZ_OK))))
00580     gErrorMessageStream.bSendMessage = TRUE;
00581 }
00582 
00583 void LogMSTurboMode(BOOL bTurboMode)
00584 {
00585   char szMessageStream[MAX_BUF];
00586 
00587   wsprintf(szMessageStream, "&TM=%d", bTurboMode);
00588   AppendToGlobalMessageStream(szMessageStream);
00589 }
00590 
00591 /* Function: GetExitStatusLogFile()
00592  *       in: aProductName, aLogFileBufSize
00593  *   in/out: aLogFile
00594  *  purpose: To build the full filename of the exit log file
00595  *           located in the TEMP dir given aProductName.
00596  */
00597 void GetExitStatusLogFile(LPSTR aProductName, LPSTR aLogFile, DWORD aLogFileBufSize)
00598 {
00599   char buf[MAX_BUF];
00600   char logFilename[MAX_BUF];
00601 
00602   if(!aProductName || !aLogFile)
00603     return;
00604 
00605   *aLogFile = '\0';
00606   lstrcpy(buf, szOSTempDir);
00607   MozCopyStr(szOSTempDir, buf, sizeof(buf));
00608   AppendBackSlash(buf, sizeof(buf));
00609   _snprintf(logFilename, sizeof(logFilename), SETUP_EXIT_STATUS_LOG, aProductName);
00610   logFilename[sizeof(logFilename) - 1] = '\0';
00611   _snprintf(aLogFile, aLogFileBufSize, "%s%s", buf, logFilename);
00612   aLogFile[aLogFileBufSize - 1] = '\0';
00613 }
00614 
00615 /* Function: DeleteExitStatusFile()
00616  *       in: none.
00617  *      out: none
00618  *  purpose: To delete the setup's exit status file located in
00619  *           the TEMP dir.
00620  */
00621 void DeleteExitStatusFile()
00622 {
00623   char logFile[MAX_BUF];
00624 
00625   GetExitStatusLogFile(sgProduct.szProductNameInternal, logFile, sizeof(logFile));
00626   if(FileExists(logFile))
00627     DeleteFile(logFile);
00628 }
00629 
00630 /* Function: LogExitStatus()
00631  *       in: status to log.
00632  *      out: none
00633  *  purpose: To log the exit status of this setup.  We're normally
00634  *           trying to log the need for a reboot.
00635  */
00636 void LogExitStatus(LPSTR status)
00637 {
00638   char logFile[MAX_BUF];
00639 
00640   GetExitStatusLogFile(sgProduct.szProductNameInternal, logFile, sizeof(logFile));
00641   WritePrivateProfileString(SECTION_EXIT_STATUS, KEY_STATUS, status, logFile);
00642 }
00643 
00644 /* Function: GetGreSetupExitStatus()
00645  *       in: none
00646  *      out: aStatus - status read in from the exit  status log file
00647  *  purpose: To read the exis status from the GRE setup that was run
00648  *           from within this setup.
00649  */
00650 void GetGreSetupExitStatus(LPSTR aStatus, DWORD aStatusBufSize)
00651 {
00652   char logFile[MAX_BUF];
00653 
00654   *aStatus = '\0';
00655   GetExitStatusLogFile("GRE", logFile, sizeof(logFile));
00656   if(FileExists(logFile))
00657     GetPrivateProfileString(SECTION_EXIT_STATUS, KEY_STATUS, "", aStatus, aStatusBufSize, logFile);
00658 }
00659