static bool createbootlog = true;
static bool logging_disabled = false;
-void logging_open (int bootlog, int append)
+bool logging_open(int bootlog, int append)
{
TCHAR *outpath;
TCHAR debugfilename[MAX_DPATH];
if (logging_disabled && !winuaelog_temporary_enable)
- return;
+ return true;
outpath = logpath;
debugfilename[0] = 0;
if (debugfilename[0]) {
if (!debugfile)
debugfile = log_open (debugfilename, append, bootlog, outpath);
+ return debugfile != NULL;
}
#endif
+ return true;
}
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
start_path_data, LOG_NORMAL);
if (debugfile)
log_close (debugfile);
- debugfile = 0;
+ debugfile = NULL;
+ }
+ bool ok = logging_open(first ? 0 : 1, 0);
+ if (first == 1 && !ok) {
+ write_log(_T("Failed to create log file.\n"));
}
- logging_open (first ? 0 : 1, 0);
logging_started = 1;
first++;
extern void fpux_save (int *v);
extern void fpux_restore (int *v);
-extern void logging_open (int,int);
-extern void logging_cleanup (void);
+extern bool logging_open(int,int);
+extern void logging_cleanup(void);
extern LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointers, DWORD ec);