For a FileStream, you can get the underlying file's Win32 handle by querying
the Handle property.
For a MemoryStream, I doubt any kind of handle is available.
For a NetworkStream, you can access the underlying socket through the Socket
property. This property is however protected.
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"Shawn Anderson" <sa*******@eye-catcher.com> wrote in message
news:ub****************@TK2MSFTNGP12.phx.gbl...
Anyone know how I can get a Win32 HANDLE from a StreamReader or
StreamWriter? I want to work with some I/O using Win32 APIs, but I would
like to attach the I/O to a .NET Stream class.
Any suggestions?
Thanks
Shawn