Get an IntPtr from Istream interface implementation
I have implemented a C# wrapper (MyStream) for IStream interface. I want to pass an object of type IStream into a COM dll as an IntPtr. For this, I create a MyStream object by reading in a file using File.Read method (which returns a FileStream and I pass that into the MyStream whose constructor takes in the FileStream). The pseudocode is as given below: