From 816d3b463aa23516dc25c934c41d6483d9e3d3f5 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 11 Nov 2014 19:27:54 +0000 Subject: fixed vi info in command line git-svn-id: http://svn.miranda-ng.org/main/trunk@10957 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CrashDumper/src/crshdmp.cpp | 15 +++++++++++++++ plugins/CrashDumper/src/utils.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'plugins/CrashDumper') diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 8c195c3276..19938264d7 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -128,6 +128,20 @@ INT_PTR ViewVersionInfo(WPARAM wParam, LPARAM) return 0; } +INT_PTR GetVersionInfo(WPARAM wParam, LPARAM lParam) +{ + int result = 1; //failure + if (lParam != NULL) { + CMString buffer; + PrintVersionInfo(buffer, (unsigned int)wParam); + char **retData = (char **)lParam; + *retData = mir_utf8encodeT(buffer.c_str()); + if (*retData) + result = 0; //success + } + return result; +} + INT_PTR OpenUrl(WPARAM wParam, LPARAM) { switch (wParam) { @@ -349,6 +363,7 @@ extern "C" int __declspec(dllexport) Load(void) CreateServiceFunction(MS_CRASHDUMPER_STORETOFILE, StoreVersionInfoToFile); CreateServiceFunction(MS_CRASHDUMPER_STORETOCLIP, StoreVersionInfoToClipboard); CreateServiceFunction(MS_CRASHDUMPER_VIEWINFO, ViewVersionInfo); + CreateServiceFunction(MS_CRASHDUMPER_GETINFO, GetVersionInfo); CreateServiceFunction(MS_CRASHDUMPER_UPLOAD, UploadVersionInfo); CreateServiceFunction(MS_CRASHDUMPER_URL, OpenUrl); CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceModeLaunch); diff --git a/plugins/CrashDumper/src/utils.h b/plugins/CrashDumper/src/utils.h index c538506f2e..43a6938f78 100644 --- a/plugins/CrashDumper/src/utils.h +++ b/plugins/CrashDumper/src/utils.h @@ -68,7 +68,7 @@ along with this program. If not, see . #define MS_CRASHDUMPER_STORETOFILE "CrashDmp/StoreVerInfoToFile" #define MS_CRASHDUMPER_STORETOCLIP "CrashDmp/StoreVerInfoToClip" -#define MS_CRASHDUMPER_GETINFO "Versioninfo/GetInfo" +#define MS_CRASHDUMPER_GETINFO "CrashDmp/GetInfo" #define MS_CRASHDUMPER_VIEWINFO "CrashDmp/ViewInfo" #define MS_CRASHDUMPER_UPLOAD "CrashDmp/UploadInfo" #define MS_CRASHDUMPER_URL "CrashDmp/StartUrl" -- cgit v1.2.3