diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-10 03:56:41 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-10 03:56:41 +0300 |
commit | 36a60a8021dc0fa84ce13677f69e5a3f1428fe5b (patch) | |
tree | 4b90b38a42d2dc3c1c8ebf8f7f350fd3a8dd8404 /main.cpp | |
parent | 329ad737e54ed5972a727105301877750011d9b3 (diff) |
modified: commonheaders.h
new file: gpg_wrapper.cpp
new file: gpg_wrapper.h
modified: init.cpp
modified: main.cpp
new file: messages.cpp
modified: new_gpg.vcproj
modified: utilities.cpp
modified: utilities.h
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 31 |
1 files changed, 10 insertions, 21 deletions
@@ -19,25 +19,14 @@ #include "commonheaders.h"
-int gpg_init()
+void test()
{
-/* setlocale (LC_ALL, "");
- gpgme_check_version (NULL);
- gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
-#ifdef LC_MESSAGES
- gpgme_set_locale (NULL, LC_MESSAGES, setlocale (LC_MESSAGES, NULL));
-#endif
- gpgme_error_t err;
- gpgme_ctx_t ctx;
- err = gpgme_new(&ctx);
- TCHAR error[128];
- mir_sntprintf(error, 128, _T("%d"), error);
- MessageBox(0, error, _T("info"), MB_OK);
- gpgme_protocol_t proto = GPGME_PROTOCOL_OpenPGP;
- char *tmp = mir_t2a(UniGetContactSettingUtf(NULL, szModuleName, "szGpgBinPath", _T("")));
- char *tmp2 = mir_t2a(UniGetContactSettingUtf(NULL, szModuleName, "szHomePath", _T("")));
- gpgme_ctx_set_engine_info(ctx, proto, tmp, tmp2);
- mir_free(tmp);
- mir_free(tmp2); */
- return 0;
-}
+ DWORD exitcode;
+ string output;
+ TCHAR *bin_path = UniGetContactSettingUtf(NULL, szModuleName, "szGpgBinPath", _T(""));
+ TCHAR bin[512];
+ _tcscpy(bin, bin_path);
+ _tcscat(bin, _T(" --help"));
+ pxResult pxresult=pxExecute(bin,"",&output,&exitcode);
+ MessageBoxA(0, output.c_str(), "", MB_OK);
+}
\ No newline at end of file |