There’s a technique in Unix where you can pass a file descriptor (FD) from one process to another through Unix domain sockets on BSD or pipes on SysV. However, how do you do it on Win32? The “Unix emulation” that Windows provides, called Interix, says in its UNIX Application Migration Guide:
The two sockets functions recvmsg and sendmsg appear in many network applications but are not supported by Interix. These functions are the only way to pass an open file descriptor from one running process to another running process.
This doesn’t make it sound very promising. Can you really not pass FD’s between processes on Win32? In the hopes that someone else out there who knows Win32 much better than I do has already solved this, I’m asking for help. If you know of a way to pass FDs on Win32, please leave me a note in the comments or send me an email. Remember, I know how to do it on Unix already. I’m asking specifically for how to do it on Win32, if it’s even possible. Thanks.