What about pipes?
-
I recently had the need to stream data to a running application using anonymous pipes. I was very surprised to find it so hard in .NET! I ended up using the "CreatePipe()" and "CloseHandle()" functions using "DllImport(kernel32.dll)". Is there really no native support for pipes in the FCL?
-
I recently had the need to stream data to a running application using anonymous pipes. I was very surprised to find it so hard in .NET! I ended up using the "CreatePipe()" and "CloseHandle()" functions using "DllImport(kernel32.dll)". Is there really no native support for pipes in the FCL?
I'm an admitted "pipes" newbie; I've done some reading on named pipes, and that's about it. I think that MS is moving away from named pipes (which might not be the same thing you're talking about). I'd normally use sockets or something else, but I realize you might not have that luxury. Are you saying that this application you had to interface with is not your own, which dictates the choice of pipes? If so, and there's no direct support, I feel for ya. Regards, Jeff Varszegi
-
I'm an admitted "pipes" newbie; I've done some reading on named pipes, and that's about it. I think that MS is moving away from named pipes (which might not be the same thing you're talking about). I'd normally use sockets or something else, but I realize you might not have that luxury. Are you saying that this application you had to interface with is not your own, which dictates the choice of pipes? If so, and there's no direct support, I feel for ya. Regards, Jeff Varszegi
It's actually "anonymous pipes" I'm talking about (e.g., not "named pipes"). When you create an anonymous pipe, you get TWO handles - one you use on your side of the connection, the other you pass to the remote application. The pipe is "anonymous" in that there is no "name" for it - there is no need, as both sender and receiver can access it using the handles that are returned. The application I'm interfacing with is Microsoft Flight Simulator 2002 (MSFS2k2). There is a facility built in to MSFS2k2 to send it a "Flight Video" by passing it a handle to an open file containing the video. By using an anonymous pipe, I can have one process create and send a video to MSFS2K in real-time. This is what I want to do. I have it working now, but I sure am surprised if in fact MS.NET doesn't provide support for this - especially as it continues to be a necessary tool for interacting with MS products...