On 03/13/2015 07:54 AM, Eli Zaretskii wrote: > file handles (which are > actually pointers in disguise). Only to the extent that file descriptors are also pointers in disguise. > Handles to kernel objects are > system-global on Windows, They work like file descriptors. > so you can make a handle inheritable, and > then pass its value to the subprocess as a command-line argument; the > subprocess then should convert it to a Posix-style file descriptor by > calling a function. > > But for this to work vis-à-vis gpg, the Windows port of gpg should > perform its part of this dance: it should know it accepts handles > (which could be 64-bit wide in 64-bit builds) Even on 64-bit builds of Windows, HANDLEs only have 32 significant bits: see https://msdn.microsoft.com/en-us/library/windows/desktop/aa384203%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa384249%28v=vs.85%29.aspx (Note that we can't know in advance whether a HANDLE will be shared with a 32-bit application.)