How to read from a named pipe in 'Message' mode [Windows]?
12 views (last 30 days)
Show older comments
I am trying to read from a named pipe in Windows using the .NET framework. I am using the following code to connect to the pipe:
NET.addAssembly(System.Core)
pipeClient = System.IO.Pipes.NamedPipeClientStream('.','pipeName',System.IO.Pipes.PipeDirection.In);
pipeClient.Connect();
Once the pipe is connected, the pipeClient TransmissionMode and ReadMode are set to 'Byte,' but I want to read from the pipe in 'Message' mode. When I try to change the ReadMode, I get the following error:
>> pipeClient.ReadMode = System.IO.Pipes.PipeTransmissionMode.Message
Message: Access to path is denied.
Source: System.Core
HelpLink:
If anyone can help me, I'd greatly appreciate it!!
NOTE: I am not an object oriented programmer, so please be kind :-)...
1 Comment
Dasharath Gulvady
on 28 May 2015
Are you able to achieve this outside MATLAB? If yes, how are you doing this? If not, can you try outside MATLAB and make sure it works in the .NET environment?
Answers (0)
See Also
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!