named-pipes

How to create a virtual file?

╄→гoц情女王★ 提交于 2019-11-27 01:27:36
问题 I'd like to simulate a file without writing it on disk. I have a file at the end of my executable and I would like to give its path to a dll. Of course since it doesn't have a real path, I have to fake it. I first tried using named pipes under Windows to do it. That would allow for a path like \\.\pipe\mymemoryfile but I can't make it works, and I'm not sure the dll would support a path like this. Second, I found CreateFileMapping and GetMappedFileName. Can they be used to simulate a file in

Async two-way communication with Windows Named Pipes (.Net)

前提是你 提交于 2019-11-27 00:23:46
问题 I have a windows service and a GUI that need to communicate with each other. Either can send messages at any time. I'm looking at using NamedPipes, but it seems that you cant read & write to the stream at the same time (or at least I cant find any examples that cover this case). Is it possible to do this kind of two-way communication via a single NamedPipe? Or do I need to open two pipes (one from GUI->service and one from service->GUI)? 回答1: Using WCF you can use duplex named pipes // Create

What are named pipes?

江枫思渺然 提交于 2019-11-26 23:29:32
What are they and how do they work? Context happens to be SQL Server Both on Windows and POSIX systems, named-pipes provide a way for inter-process communication to occur among processes running on the same machine. What named pipes give you is a way to send your data without having the performance penalty of involving the network stack. Just like you have a server listening to a IP address/port for incoming requests, a server can also set up a named pipe which can listen for requests. In either cases, the client process (or the DB access library) must know the specific address (or pipe name)

Shared memory between 2 processes (applications)

感情迁移 提交于 2019-11-26 22:39:54
I can't find any useful answer for this question, although it has been asked in a different way several times. I want to share a memory between two processes (two different applications), so that one of them can write to that memory and the other can read. Is this possible in .NET? How? Thanks Right now, .NET doesn't support sections (aka Memory Mapped Files). It will soon, the 4.0 version has the System.IO.MemoryMappedFiles namespace. There is a good reason it took so long and also the reason you are not going to be happy with this addition. Using pointers is mandatory in MMFs, the shared

Named Pipe Server throws UnauthorizedAccessException when creating a seccond instance if PipeSecurity is set

≯℡__Kan透↙ 提交于 2019-11-26 20:52:24
问题 I am trying to write a (elevated privilege) service that will talk to a non privileged winforms application. I was able to have two console applications (one elevated one not) talk back and forth no problem but I am having a problem doing a service and a winforms app. The first instance of the pipe works perfectly. However after my client connects and I try to create a new instance so it will be ready if a 2nd client connects, but the constructor for NamedPipeServerStream throws a exception

Why does a read-only open of a named pipe block?

戏子无情 提交于 2019-11-26 19:05:33
问题 I've noticed a couple of oddities when dealing with named pipes (FIFOs) under various flavors of UNIX (Linux, FreeBSD and MacOS X) using Python. The first, and perhaps most annoying is that attempts to open an empty/idle FIFO read-only will block (unless I use os.O_NONBLOCK with the lower level os.open() call). However, if I open it for read/write then I get no blocking. Examples: f = open('./myfifo', 'r') # Blocks unless data is already in the pipe f = os.open('./myfifo', os.O_RDONLY) #

Expose a WCF Service through a Named Pipes binding

ε祈祈猫儿з 提交于 2019-11-26 16:28:20
问题 Intro: I successfully implemented a WCF Service hosted in a Windows Service a few days ago. The community here at StackOverflow helped me with the WSDL exposure here. I thank you once again. However recently I found out that there is another potential client for this service this time located on the same machine as the service and this lead me to think I should add another endpoint with the namedPipesBinding. Named pipes seem to be the best solution for intra-machine communication as far as I

How to open a Windows named pipe from Java?

痞子三分冷 提交于 2019-11-26 16:25:54
On our Linux system we use named pipes for interprocess communication (a producer and a consumer). In order to test the consumer (Java) code, I would like to implement (in Java) a dummy producer which writes to a named pipe which is connected to the consumer. Now the test should also work in the Windows development environment. Thus I would like to know how to create a named pipe in Windows from Java. In Linux I can use mkfifo (called using Runtime.exec() ), but how should I do this on Windows? v01ver Use Named Pipes to Communicate Between Java and .Net Processes Relevant part in the link try

How slow are TCP sockets compared to named pipes on Windows for localhost IPC?

时间秒杀一切 提交于 2019-11-26 15:27:38
问题 I am developing a TCP Proxy to be put in front of a TCP service that should handle between 500 and 1000 active connections from the wild Internet. The proxy is running on the same machine as the service, and is mostly-transparent. The service is for the most part unaware of the proxy, the only exception being the notification of the real remote IP address of the clients. This means that, for every inbound open TCP socket, there are two more sockets on the server: the secondth of the pair in

Connecting via named pipe from windows service (session#0) to desktop app (session #1)

谁说我不能喝 提交于 2019-11-26 14:05:59
问题 Given : - the application - desktop GUI (WPF) .NET app - windows service watching for application (.NET also) The windows service periodically "pings" application to get sure it's healthy (and if it's not winservice will restart it). I was going to implement "pinging" via named pipes. To make things simpler I decided to do it with WCF. The application hosts a WCF-service (one operation Ping returning something). The windows service is a client for this WCF-service, invokes it periodically