gpgme on windows
Gordian Klein
gordian.klein at gmx.de
Thu Mar 19 11:34:08 CET 2009
> Try something like this:
>
> int translate_fd(int fd, int for_write) {
> #ifdef WIN32
> int x;
>
> if (fd == -1) {
> return -1;
> }
>
> x = _open_osfhandle ((long)fd, for_write ? 1 : 0);
> if (x == -1) {
> printf("Failed to translate osfhandle %p\n", (void *) fd);
> }
> return x;
> #else /*!WIN32 */
> return fd;
> #endif
> }
>
> http://msdn.microsoft.com/en-us/library/bdts1c9x(VS.71).aspx
Hello,
thank you! That did it.
I figured fd is a System Handle on a Windows machine, and so i could use
WriteFile((HANDLE)fd, ....)
directly.
Again, thank you :-)
Regards,
Grdian
More information about the Gnupg-users
mailing list