G
Guest
Hi,in one project I use a named pipe in a mixed managed-unmanaged environment. The server end of the pipe is created within an unmanaged code,while the client end is opened within managed code. In order to open the client end,I had imported the Win32 API functions CreteFile(),SetNamedPipeHandleState(),CloseHandle(). Then I first open the pipe by invoking CreateFile(),then setting the proper state with a call to SetNamedPipeHandleState(),followed by creation of a FileStream object,where i pass the handle to the pipe to the constructor. After I am done,i call the file stream object's Close() method, but it seams that there is some problem,and the pipe is not closed correctly, since at the next attempt to open the pipe, i get an IOException. The server end of the pipe is opened with no restriction to the number of the istances of the pipe that can be created
I even tried to close the pipe by calling the imported CloseHandle(),but the result is the same
Any suggestions what could be the problem are appreciated
Thanks in advance
Svetoslav
I even tried to close the pipe by calling the imported CloseHandle(),but the result is the same
Any suggestions what could be the problem are appreciated
Thanks in advance
Svetoslav