Kourosh,
In COM, IStream is not an object, but an interface. You have to
implement that interface on a class, and pass that implementation to the
method to be acted upon.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> Hi all,
> I'm trying to call a COM function from C#
[quoted text clipped - 4 lines]
> because I'm not sure how to create an instance of the "IStream" object
> in C#
Kourosh - 21 Oct 2007 03:26 GMT
oh yea oops :D
so there is no easy way in C# to perhaps use the Stream class, or any
built in COM object from .NET for this purpose?
> Kourosh,
>
[quoted text clipped - 16 lines]
>
> - Show quoted text -
Nicholas Paldino [.NET/C# MVP] - 21 Oct 2007 03:45 GMT
You could create a wrapper which maps the IStream implementation to the
methods on Stream (there isn't a one-to-one correspondence between the
methods on IStream and Stream, but it shouldn't be hard).
However, it depends on what you are trying to feed the method. What is
it that you have the data in which you want the method to access through the
IStream?

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> oh yea oops :D
> so there is no easy way in C# to perhaps use the Stream class, or any
[quoted text clipped - 20 lines]
>>
>> - Show quoted text -