/util/drmingw: 088532978452: Add ability to specify the location...
Daniel Atallah
datallah at pidgin.im
Mon Sep 10 12:11:13 EDT 2012
Changeset: 0885329784521c1c8e4e6b65f6e6a7ba3b7305b0
Author: Daniel Atallah <datallah at pidgin.im>
Date: 2012-09-08 12:49 -0400
Branch: default
URL: http://hg.pidgin.im/util/drmingw/rev/088532978452
Description:
Add ability to specify the location of the crash report file using a SetLogFile() function
diffstat:
exchndl.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diffs (23 lines):
diff --git a/exchndl.c b/exchndl.c
--- a/exchndl.c
+++ b/exchndl.c
@@ -1244,6 +1244,19 @@ void OnExit(void)
SetUnhandledExceptionFilter(prevExceptionFilter);
}
+_declspec(dllexport) void __cdecl SetLogFile(const char *logFileName);
+_declspec(dllexport) void __cdecl SetLogFile(const char *logFileName)
+{
+ int bufSize = sizeof(szLogFileName) / sizeof(TCHAR);
+ if (!logFileName || _tcslen(logFileName) > bufSize - 1) {
+ printf("Specified LogFileName(%s) is too long or invalid\n", logFileName);
+ _tcscpy(szLogFileName, _T(""));
+ return;
+ }
+ _tcsncpy(szLogFileName, logFileName, bufSize - 1);
+ szLogFileName[bufSize - 1] = _T('\0');
+}
+
#if 0
BOOL APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
More information about the Commits
mailing list