named-pipes

PowerShell Named Pipe: no connection?

自作多情 提交于 2019-12-06 08:15:24
问题 I need a named pipe to read and write. In a program I create the pipe server using from kernel32.dll : string PipeName = "\\\\.\\pipe\\myMT4"; int PipeMode = PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT; # tried too: PIPE_NOWAIT int hPipe = CreateNamedPipeW( PipeName, PIPE_ACCESS_DUPLEX, PipeMode, PIPE_UNLIMITED_INSTANCES,1024,1024, NMPWAIT_USE_DEFAULT_WAIT,NULL); The handle hPipe is valid - every things seems to be ok here! But in a PowerShell-script I want to open a client, connect and

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

天涯浪子 提交于 2019-12-06 06:33:52
问题 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

Russell Libby's Pipes components

断了今生、忘了曾经 提交于 2019-12-06 06:30:43
Does anyone know where I could download Russell Libby's named pipes components? All the links I can find point to http://home.roadrunner.com/~rllibby/source.html Which is no longer alive. HMcG I have found the TPipeServer and TPipeClient source code here . Looks like the original Russell Libby's code. Here's the version I have on my system. I tried posting it directly in this comment but it is too long. This source code should work on Delphi 6 and up (including Delphi 2009, 2010, and XE). I posted it here . For detailed directions on how to generally turn this source file into a design-time

Named pipes port number

人盡茶涼 提交于 2019-12-06 03:17:15
问题 Does named pipes use ports to communicate? Named pipes i use: http://msdn.microsoft.com/en-us/library/aa365150%28VS.85%29.aspx 回答1: Yes, when communicating with remote machines it uses ports 137 and 139 UDP and potentially 445 TCP. Locally pipes are implemented via MMF (memory mapped files). Essentially some of the facilities used in the CIFS/SMB protocol are also used for named pipes when communicating with remote machines. 来源: https://stackoverflow.com/questions/5804019/named-pipes-port

Reading/writing from named pipes under mono/Linux

隐身守侯 提交于 2019-12-05 22:05:24
I would like to read/write from a named pipe/FIFo queue under Linux. I have tried the standard classes StreamWriter and other classes from System.IO, but it fails because it is using seek. Has anyone ever written/read from a named pipe using Mono?. I am managing to read and write - but not the same time... You'll need to open separate readers and writers; for some reason, Mono treats FIFOs as if they are seekable (it's a bug), even though they aren't. 来源: https://stackoverflow.com/questions/713660/reading-writing-from-named-pipes-under-mono-linux

C - named pipe for multiple forked children

∥☆過路亽.° 提交于 2019-12-05 20:08:15
If you have multiple children created by fork(), and the method of communication with the parent is "named pipes", do you need multiple named pipes? One for each child? Or can you make one and have the parent read from that? Basically, is there anything else you need to do? I understand if several children write to the same named pipe at the same time, it might cause a problem with reading a whole message from a single child. Is there a way to make sure the writes are atomic? You can have several writers with a single pipe. However, as you say communication is between fork()ed children and the

using istream to read from named pipe

非 Y 不嫁゛ 提交于 2019-12-05 18:39:15
Is it possible to read from named pipe (mkfifo) using c++ (stl) using a stream - thus not defining in advance char *buffer[MAX_SIZE] for the read operation? I want to read till the buffer ends and put the result into std::string . (Current method: bytes = read(fd, buffer, sizeof(buffer)); requires allocation some kind of buffer in advance.) Named pipes created with mkfifo behave like regular files. Thus they can be accessed using std::ifstream and std::ofstream : #include <fstream> #include <iostream> int main(int, char** argv) { std::ifstream file{argv[1]}; std::string line; std::getline(file

Is it possible to open a named pipe with command line in windows?

不羁岁月 提交于 2019-12-05 12:47:00
问题 I want to interact with the pipe manually , but so far I can only do this in the programe,which is not very intuitive. The effect I want to achieve is a little similar to : telnet localhost 3306 tail -f file.txt Anyone get my idea? 回答1: Look here: http://support.microsoft.com/kb/68941 There are two utilities shipped with SQL Server designed to help test network named pipes. The MakePipe.exe and ReadPipe.exe utilities are installed during installation of both the client and server components

Windows 8 named pipe creation

一世执手 提交于 2019-12-05 10:28:37
How I can create named pipe in the Windows 8 with AppContainer integrity level? Roman Boiko As Pavel Minaev mentioned in one of comments to some answer , there are no named pipes in WinRT (for Metro applications, for desktop applications pipes are the same as in Windows 7): Named pipes aren't there, for example, nor are memory mapped files. There are sockets (including server sockets), but when connecting to localhost, you can only connect to the same app. You may be interested in the WinRT API , including sockets . Talking about WinRT - you really can't create named pipe. Talking about

IPC: Using of named pipes in c++ between two programs

戏子无情 提交于 2019-12-05 08:58:44
I'm trying to realise a IPC between two different programs running on the same machine (in my case its a CentOS7). To have just a kind of loose coupling I decided to use a named pipe for the IPC. Therefore I'm was playing with the following example and ran into different problems. Creating and writing into the pipe: #include <sys/types.h> #include <sys/select.h> #include <errno.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <string.h> using namespace std; main() { int fd; char * myfifo =