I would like to connect to that pipe from another PC. To do that, I'm
using CreateFile() like this:
m_hPipe = ::CreateFile( _T( "\\\\192.168.1.2\\pipe\\MyPipeName" ),
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL )
For now, I'm testing with both the client and server on the same PC,
but still specifying the IP address of one of the network cards as
shown above. Unfortunately, the CreateFile() call fails with error
code 2: "The system cannot find the file specified". If, instead of
the IP address, I use a ".", everything works correctly.
I'm using Windows XP SP3 with MSVS2008. My windows firewall is
disabled.
What can I do to get the pipe to connect across a network connection?
Thanks,
PaulH
EDIT: The PC I'm running this on has two NICs. If I disable the NIC
that this server will not use, I get a different error code: 1265 -
"The system detected a possible attempt to compromise security. Please
ensure that you can contact the server that authenticated you."
Also, make sure to provide correct SecurityAttributes if you want to connect
to the pipe from other processes and machines.
--
Christoph Lindemann
"PaulH" <paul...@gmail.com> wrote in message
news:3c7ca2d1-ab0d-413e...@o40g2000prn.googlegroups.com...
It was the security attribute structure that fixed it. I had to create
a DACL. (I also fixed the file attribute, though.)
Thanks for your help!
-PaulH