GPGME callback function problem
marcus.brinkmann at ruhr-uni-bochum.de
Mon Sep 10 18:49:38 CEST 2007
At Mon, 10 Sep 2007 11:38:00 -0500,
Shawn Walker <swalker at bynari.net> wrote:
> Marcus Brinkmann wrote:
> > At Fri, 31 Aug 2007 12:44:47 -0700 (PDT),
> > alan_b <gtbui at yahoo.com> wrote:
> >> So, in that callback function, what W32 function call should I use to write
> >> the password to the fd ?
> >> The original code is write( ), which did not compile in Windows. I replaced
> >> it with _write( ), which gave the assertion error on the fd.
> > WriteFile
> > Marcus
> Windows do support write(), you need to have the following inclues:
write() needs libc handles, while WriteFile uses windows handles,
which is what GPGME provides (and uses internally).
You can use write(), but then you have to convert the handles. See
the MSDN documentation for details (_get_osfhandle, _open_osfhandle).
More information about the Gnupg-devel