named-pipes

How do I connect to the VMware's pipe and receive debug information from the running OS?

╄→гoц情女王★ 提交于 2019-12-04 16:52:39
I'm trying to catch debug information from VMware. This might be an easy task because you can redirect all debug information from VMware's OS into the named pipe like is nicely described here . It works fine with WinDbg but I want to create my own application which will do exactly the same. So I've decided to connect to the named pipe provided by VMware and read from it. I'm able to connect to that named pipe but I'm getting meaningless result when reading from the pipe. I've simplified the real code into the unsafe infinite loop. It's enough to have a memo and button on a form and use the

simple IPC mechanism for C#/WPF application to implement app CLI

早过忘川 提交于 2019-12-04 16:27:35
So I've been reading lots about interprocess communication on .Net. Named pipes, remoting. It all seems great but possibly overkill for what I need to do. I want to add a command line interface to my WPF application, so I need a simple IPC mechanism to send the string from one process to the already running app. What does SO recommend for doing so? JP Alioto NamedPipeClientStream and NamedPipeServerStream are pretty simple. Here's a pretty simple example where IPC is used to pass command line arguments from one instance of an application to another. It's not exactly what you want to do, but

Named Pipes server, how to interrupt or timeout the wait for client connection and for incoming data

主宰稳场 提交于 2019-12-04 14:52:38
I am writing a simple Named Pipes server for Windows, calling the Windows API (in Java with JNA but this is not relevant). I am trying to figure out how to avoid that the server stays stuck forever waiting for a client to connect or for data to come from the client. The server code does the following: 1) It creates the pipe by calling CreateNamedPipe , with PIPE_WAIT in the dwPipeMode argument. 2) It calls ConnectNamedPipe which doesn't return until a client has connected. 3) It enters a loop where it repeatedly reads a message from the client by calling ReadFile which doesn't return until

How to make a named pipe not busy after client has disconnected?

岁酱吖の 提交于 2019-12-04 14:31:08
问题 I use a named pipe and I want to reuse the same pipe on the server to allow connecting another client once the original client has disconnected. What I do is: server creates a pipe using CreateNamedPipe server writes data using WriteFile , and retries doing so as long as error ERROR_PIPE_LISTENING is returned (which is before any client is connected) clients connects using CreateFile client reads data client close pipe handle using CloseHandle at this point server gets error ERROR_NO_DATA

Switch from file contents to STDIN in piped command? (Linux Shell)

非 Y 不嫁゛ 提交于 2019-12-04 11:44:04
问题 I have a program (that I did not write) which is not designed to read in commands from a file. Entering commands on STDIN is pretty tedious, so I'd like to be able to automate it by writing the commands in a file for re-use. Trouble is, if the program hits EOF, it loops infinitely trying to read in the next command dropping an endless torrent of menu options on the screen. What I'd like to be able to do is cat a file containing the commands into the program via a pipe, then use some sort of

return value from child process c

て烟熏妆下的殇ゞ 提交于 2019-12-04 11:27:36
I need help returning a "status code" from my child program back to the parent, where it will check the status code, print code, and exit the parent. This is for a class project, so I will put some relevant code here, but I don't to post the entire project for obvious reasons. I have forked and created the child process through exec. The parent does some fancy math and uses a named pipe to push data to the child process. The child does some more fancy math. When I uses a keyword, the child needs to return the number of times it did the fancy math on its end back to the parent, where the parent

How can I control an interactive Unix application programmatically through Perl?

帅比萌擦擦* 提交于 2019-12-04 11:23:09
问题 I have inherited a 20-year-old interactive command-line unix application that is no longer supported by its vendor. We need to automate some tasks in this application. The most troublesome of these is creating thousands of new records with slightly different parameters (e.g. different identifiers, different names). The records have to be created in sequence, one at a time, which would take many months (and therefore dollars) to do manually. In most cases, creating a record has a very

How do you configure WCF to support FaultContracts where both the host and client are in the same process using a net.pipe?

笑着哭i 提交于 2019-12-04 10:53:11
I'm trying to create an in-process unit test for my service to client interactions using net.pipe binding. Like a good WCF service it uses FaultContractAttribute on service operations to expose possible faults (wrapped exceptions) to metadata. I would like to have the client and service endpoints configured thru XML (App.config). However, whenever a fault is thrown, it's just a CommunicationException "pipe has closed", and not the typed Fault I was expecting. System.ServiceModel.CommunicationException: There was an error reading from the pipe: The pipe has been ended. (109, 0x6d). I tried

There was no endpoint listening at net.pipe://localhost/

…衆ロ難τιáo~ 提交于 2019-12-04 09:23:06
问题 I have two WCF services hosted in a single Windows Service on a Windows Server 2003 machine. If the Windows service needs to access either of the WCF services (like when a timed event occurs), it uses one of the five named pipe endpoints exposed (different service contracts). The service also exposes HTTP MetadataExchange endpoints for each of the two services, and net.tcp endpoints for consumers external to the server. Usually things work great, but every once in a while I get an error

What is an overlapped I/O alternative to WaitNamedPipe?

南楼画角 提交于 2019-12-04 06:26:23
The WaitNamedPipe function allows a pipe client application to synchronously wait for an available connection on a named pipe server. You then call CreateFile to open the pipe as a client. Pseudocode: // loop works around race condition with WaitNamedPipe and CreateFile HANDLE hPipe; while (true) { if (WaitNamedPipe says connection is ready) { hPipe = CreateFile(...); if (hPipe ok or last error is NOT pipe busy) { break; // hPipe is valid or last error is set } } else { break; // WaitNamedPipe failed } } The problem is that these are all blocking, synchronous calls. What is a good way to do