Saturday, 24 August 2013

Cannot create named pipe

Cannot create named pipe

i am trying to communicate beween c++ module and c# module using namedpipe
in my code
_pipe = CreateFile(
pipeName.c_str(),
GENERIC_READ, // only need read access
FILE_SHARE_READ ,
NULL,
CREATE_ALWAYS ,
FILE_ATTRIBUTE_NORMAL,
NULL
);
if(_pipe == INVALID_HANDLE_VALUE)
{
DWORD err = GetLastError();
int i = 5;
}
i am always getting error 2 when i try to create the pipe using
listener = new PipeListener("\\\\.\\pipe\\mynamedpipe");

No comments:

Post a Comment