summaryrefslogtreecommitdiff
path: root/plugins/ShellExt/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-29 19:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-29 19:31:04 +0000
commita69315d034c9fd6ece1a88bfe56fdef71b3d3b1c (patch)
treea8c747bf707b29989d10d0f484aa205533691e16 /plugins/ShellExt/src/main.cpp
parentb40560beff744f65de941a70af2b7990cca9947a (diff)
logging for ShlExt
git-svn-id: http://svn.miranda-ng.org/main/trunk@5881 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ShellExt/src/main.cpp')
-rw-r--r--plugins/ShellExt/src/main.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp
index 1de8cef3e8..b7b66556e6 100644
--- a/plugins/ShellExt/src/main.cpp
+++ b/plugins/ShellExt/src/main.cpp
@@ -108,10 +108,27 @@ STDAPI DllUnregisterServer()
/////////////////////////////////////////////////////////////////////////////////////////
+static TCHAR tszLogPath[MAX_PATH];
+
+void logA(const char *format, ...)
+{
+ FILE *out = _tfopen(tszLogPath, _T("a+"));
+ if (out) {
+ va_list args;
+ va_start(args, format);
+ vfprintf(out, format, args);
+ va_end(args);
+ fclose(out);
+ }
+}
+
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
-
+
+ GetTempPath(SIZEOF(tszLogPath), tszLogPath);
+ _tcscat_s(tszLogPath, SIZEOF(tszLogPath), _T("shlext.log"));
+
InvokeThreadServer();
HookEvent(ME_OPT_INITIALISE, OnOptionsInit);
DllRegisterServer();