summaryrefslogtreecommitdiff
path: root/main.cpp
blob: b3f01d5d249a241ffe008a0b097893c6f7392d3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright © 2010 sss
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.




#include "commonheaders.h"

void test()
{
	DWORD exitcode;
	string output;
	TCHAR *bin_path = UniGetContactSettingUtf(NULL, szModuleName, "szGpgBinPath", _T(""));
	TCHAR *home_dir = UniGetContactSettingUtf(NULL, szModuleName, "szHomePath", _T(""));
	TCHAR bin[512];
	_tcscpy(bin, bin_path);
	_tcscat(bin, _T(" --homedir "));
	_tcscat(bin, _T("\""));
	_tcscat(bin, home_dir);
	_tcscat(bin, _T("\""));
	_tcscat(bin, _T(" --help"));
	pxResult pxresult=pxExecute(bin,"",&output,&exitcode);
	mir_free(bin_path);
	mir_free(home_dir);
	MessageBoxA(0, output.c_str(), "", MB_OK);
}