// 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("")); { if(_waccess(bin_path, 0) == -1) if(errno == ENOENT) { mir_free(bin_path); return; } } 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); /* fstream f("c:\\str.txt", std::ios::out); f<