Well, i use a c++ program to do the same (using CreateProcess and redirecting STDIN, STDOUT, STDERR) My code is
STARTUPINFO si; BOOL result; memset(&si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; si.hStdInput = m_childstdinrd; si.hStdOutput = m_childstdoutwr; si.hStdError = m_childstderrwr; si.wShowWindow = SW_HIDE; result = CreateProcess( NULL, (char *)m_cmdline.c_str(), NULL, NULL, TRUE, 0, NULL, NULL, &si, &m_procinfo ); And m_cmdline is defined as: m_cmdline = "gpg.exe"; m_cmdline += " --photo-viewer \"cmd /c copy /Y \"%i\" " + filename + "\"\""; m_cmdline += " --status-fd 1 --command-fd 0 --edit-key \"" + fingerprint + "\""; So the edit-key command requieres additional input (since i say '--command-fd 0' I'm able to use the redirected STDIN handle) that looks like the following input = "showphoto\n"; // the edit command input += "quit\n"; // quit is quit HTH > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Thomas > Zangl - Home > Sent: Mittwoch, 16. März 2005 17:28 > To: (GnuPG users) > Subject: Re:Saving photo of a key to a given filename > > > > Am Wed, 16 Mar 2005 15:49:27 +0100, schrieb "Sascha Kiefer" > <[EMAIL PROTECTED]>: > > Hi, > > >you can use the photo-viewer option. > >example: > > > >- --photo-viewer \"cmd /c copy /Y \"%i\"filename.tmp\"\" > > > >will copy the picture-file to filename.tmp > > Does work from the command line but not from within my Delphi > App. It seems that "cmd" is not called at all - maybe because > GPG is called from within a temporary batchfile which is > executed through "CreateProcess"... > > Is there no easy way to get the jpeg w/o using tempfiles > etc..? (Like I can parse the --list-keys output etc...) > > Best regards, > -- > ---------------------------------------------------------------- > ,yours Thomas Zangl [EMAIL PROTECTED] -TZ1-6BONE- > -http://tzi.dhs.org - http://www.borg-kindberg.ac.at Use > YAMC! now! Get it at http://www.borg-kindberg.ac.at/yamc/ > > _______________________________________________ > Gnupg-users mailing list > Gnupg-users@gnupg.org > http://lists.gnupg.org/mailman/listinfo/gnupg-users > _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users