diff options
author | George Hazan <george.hazan@gmail.com> | 2012-05-26 14:47:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-05-26 14:47:04 +0000 |
commit | 1d9dd615e5f1a43d3b78f37b5aaae836dfac1c4d (patch) | |
tree | dd3dd64e8c60cccb072e5acae857c9c55203e86d /plugins/Svc_vi/services.cpp | |
parent | 32abe163ec316671ec5a0a3bbec68ec13f71cb92 (diff) |
- plugin converted to Unicode
- old bug fixed with the profile path
git-svn-id: http://svn.miranda-ng.org/main/trunk@182 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Svc_vi/services.cpp')
-rw-r--r-- | plugins/Svc_vi/services.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/plugins/Svc_vi/services.cpp b/plugins/Svc_vi/services.cpp index 3e137abf7c..4efa482404 100644 --- a/plugins/Svc_vi/services.cpp +++ b/plugins/Svc_vi/services.cpp @@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include "common.h"
#include "services.h"
HANDLE hsMenuCommand;
@@ -55,19 +56,15 @@ INT_PTR PluginMenuCommand(WPARAM wParam, LPARAM lParam) INT_PTR GetInfoService(WPARAM wParam, LPARAM lParam)
{
int result = 1; //failure
- if (lParam != NULL)
- {
- CVersionInfo myInfo;
- myInfo.Initialize();
- std::string VI = myInfo.GetInformationsAsString(wParam);
- char **retData = (char **) lParam;
- (*retData) = (char *) MirandaMalloc(VI.size() + 1);
- if (retData)
- {
- strcpy(*retData, VI.c_str());
- result = 0; //success
- }
- }
+ if (lParam != NULL) {
+ CVersionInfo myInfo;
+ myInfo.Initialize();
+ std::tstring VI = myInfo.GetInformationsAsString(wParam);
+ char **retData = (char **) lParam;
+ *retData = mir_utf8encodeT( VI.c_str());
+ if (*retData)
+ result = 0; //success
+ }
return result;
}
@@ -75,6 +72,5 @@ INT_PTR ServiceModeService(WPARAM wParam, LPARAM lParam) {
bServiceMode = 1;
DoDebugTo(TO_ASK);
-
return 0;
}
|