You can call the CreateFile API through the P/Invoke layer. Once you
have the handle to the pipe, you can pass it to the constructor of the
FileStream class to read from/write to it.
"Lou" <lou.garvin@com cast.net> wrote in message
news:OWnP9HOuDH A.2224@TK2MSFTN GP09.phx.gbl...[color=blue]
> How do i connect to a named pipe as a client?
> -Lou
>
>[/color]
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote in
message news:%23Lid6OOu DHA.540@tk2msft ngp13.phx.gbl.. .[color=blue]
> Lou,
>
> You can call the CreateFile API through the P/Invoke layer. Once you
> have the handle to the pipe, you can pass it to the constructor of the
> FileStream class to read from/write to it.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard. caspershouse.co m
>
> "Lou" <lou.garvin@com cast.net> wrote in message
> news:OWnP9HOuDH A.2224@TK2MSFTN GP09.phx.gbl...[color=green]
> > How do i connect to a named pipe as a client?
> > -Lou
> >
> >[/color]
>
>[/color]
"Lou" <lou.garvin@com cast.net> wrote in message
news:uVAUUGPuDH A.2360@TK2MSFTN GP10.phx.gbl...[color=blue]
> What is the P/Invoke layer?
> using ?????
>
>
>
> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote[/color]
in[color=blue]
> message news:%23Lid6OOu DHA.540@tk2msft ngp13.phx.gbl.. .[color=green]
> > Lou,
> >
> > You can call the CreateFile API through the P/Invoke layer. Once[/color][/color]
you[color=blue][color=green]
> > have the handle to the pipe, you can pass it to the constructor of the
> > FileStream class to read from/write to it.
> >
> > Hope this helps.
> >
> >
> > --
> > - Nicholas Paldino [.NET/C# MVP]
> > - mvp@spam.guard. caspershouse.co m
> >
> > "Lou" <lou.garvin@com cast.net> wrote in message
> > news:OWnP9HOuDH A.2224@TK2MSFTN GP09.phx.gbl...[color=darkred]
> > > How do i connect to a named pipe as a client?
> > > -Lou
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]
CreateFile returns a int
The FileSystemObjec tcs contructor won't take an int???
I can get a handle using CreateFile but the fileSystemObjec t chokes on it???
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote in
message news:%23Lid6OOu DHA.540@tk2msft ngp13.phx.gbl.. .[color=blue]
> Lou,
>
> You can call the CreateFile API through the P/Invoke layer. Once you
> have the handle to the pipe, you can pass it to the constructor of the
> FileStream class to read from/write to it.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard. caspershouse.co m
>
> "Lou" <lou.garvin@com cast.net> wrote in message
> news:OWnP9HOuDH A.2224@TK2MSFTN GP09.phx.gbl...[color=green]
> > How do i connect to a named pipe as a client?
> > -Lou
> >
> >[/color]
>
>[/color]
Your definition of CreateFile should return an IntPtr, not an int. You
use IntPtr for things such as pointers, handles, etc, etc, where the size of
the integer is dependent on the platform.
"Lou" <lou.garvin@com cast.net> wrote in message
news:eIlHgpQuDH A.2368@TK2MSFTN GP09.phx.gbl...[color=blue]
> CreateFile returns a int
> The FileSystemObjec tcs contructor won't take an int???
>
> I can get a handle using CreateFile but the fileSystemObjec t chokes on[/color]
it???[color=blue]
>
>
> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote[/color]
in[color=blue]
> message news:%23Lid6OOu DHA.540@tk2msft ngp13.phx.gbl.. .[color=green]
> > Lou,
> >
> > You can call the CreateFile API through the P/Invoke layer. Once[/color][/color]
you[color=blue][color=green]
> > have the handle to the pipe, you can pass it to the constructor of the
> > FileStream class to read from/write to it.
> >
> > Hope this helps.
> >
> >
> > --
> > - Nicholas Paldino [.NET/C# MVP]
> > - mvp@spam.guard. caspershouse.co m
> >
> > "Lou" <lou.garvin@com cast.net> wrote in message
> > news:OWnP9HOuDH A.2224@TK2MSFTN GP09.phx.gbl...[color=darkred]
> > > How do i connect to a named pipe as a client?
> > > -Lou
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]
Comment