Lou,
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.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Lou" <lo********@comcast.net> wrote in message
news:eI**************@TK2MSFTNGP09.phx.gbl...
CreateFile returns a int
The FileSystemObjectcs contructor won't take an int???
I can get a handle using CreateFile but the fileSystemObject chokes on
it???
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2***************@tk2msftngp13.phx.gbl... 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]
- mv*@spam.guard.caspershouse.com
"Lou" <lo********@comcast.net> wrote in message
news:OW**************@TK2MSFTNGP09.phx.gbl... How do i connect to a named pipe as a client?
-Lou