- win_tray: Add logging support to trap crashes.

clienttray/
        tray_win.cpp
    win_build/
        boinctray.vcproj

svn path=/branches/boinc_core_release_6_12/; revision=22759
This commit is contained in:
Rom Walton 2010-11-29 21:20:19 +00:00
parent ae7d538764
commit 31e17cdaee
3 changed files with 37 additions and 12 deletions

View File

@ -7942,3 +7942,11 @@ Charlie 18 Nov 2010
client/
hostinfo_unix.cpp
Rom 18 Nov 2010
- win_tray: Add logging support to trap crashes.
clienttray/
tray_win.cpp
win_build/
boinctray.vcproj

View File

@ -18,6 +18,8 @@
#include "boinc_win.h"
#include "diagnostics.h"
#include "win_util.h"
#include "boinc_tray.h"
#include "tray_win.h"
#include "idlemon.h"
@ -46,6 +48,21 @@ CBOINCTray::CBOINCTray() {
//
INT CBOINCTray::Run( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR /* lpCmdLine */ , int /* nCmdShow */ ) {
// Initialize the BOINC Diagnostics Framework
int flags =
#ifdef _DEBUG
BOINC_DIAG_MEMORYLEAKCHECKENABLED |
#endif
BOINC_DIAG_DUMPCALLSTACKENABLED |
BOINC_DIAG_HEAPCHECKENABLED |
BOINC_DIAG_TRACETOSTDOUT |
BOINC_DIAG_REDIRECTSTDERR |
BOINC_DIAG_REDIRECTSTDOUT;
chdir_to_data_dir();
diagnostics_init(flags, "stdouttray", "stderrtray");
// Create application window class
if (!hPrevInstance) {
// Register an appropriate window class for the primary window
WNDCLASS cls;

View File

@ -23,7 +23,7 @@
IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
@ -55,7 +55,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
BufferSecurityCheck="true"
FloatingPointModel="2"
UsePrecompiledHeader="2"
@ -86,7 +86,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib"
AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
LinkIncremental="0"
SuppressStartupBanner="true"
@ -133,7 +133,7 @@
IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
@ -165,7 +165,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS;_CONSOLE"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
BufferSecurityCheck="true"
FloatingPointModel="2"
UsePrecompiledHeader="2"
@ -197,7 +197,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib"
AdditionalDependencies="MSVCRTD.LIB MSVCPRTD.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
LinkIncremental="0"
SuppressStartupBanner="true"
@ -244,7 +244,7 @@
IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
@ -276,7 +276,7 @@
PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE"
StringPooling="false"
ExceptionHandling="2"
RuntimeLibrary="0"
RuntimeLibrary="2"
EnableFunctionLevelLinking="false"
FloatingPointModel="2"
UsePrecompiledHeader="2"
@ -307,7 +307,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib"
AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
ShowProgress="0"
OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
LinkIncremental="1"
@ -353,7 +353,7 @@
IntermediateDirectory=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\obj"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
@ -385,7 +385,7 @@
PreprocessorDefinitions="WIN32;NDEBUG;_MT;_WINDOWS;_CONSOLE"
StringPooling="false"
ExceptionHandling="2"
RuntimeLibrary="0"
RuntimeLibrary="2"
EnableFunctionLevelLinking="false"
FloatingPointModel="2"
UsePrecompiledHeader="2"
@ -417,7 +417,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcmt.lib libcpmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib"
AdditionalDependencies="MSVCRT.LIB MSVCPRT.LIB kernel32.lib user32.lib gdi32.lib advapi32.lib"
ShowProgress="0"
OutputFile=".\Build\$(PlatformName)\$(ConfigurationName)\$(ProjectName).exe"
LinkIncremental="1"