Results 1 to 3 of 3

Thread: COM object needing a STREAM class

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    COM object needing a STREAM class

    I'm using a COM object....there is a function I'm calling, that in C++/MFC takes in a IStream object.
    I'm not sure if there is an equivalent class I could use to pass in as that parameter in C#??? any COM l33ts out there?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: COM object needing a STREAM class

    Quote Originally Posted by MrPolite
    I'm using a COM object....there is a function I'm calling, that in C++/MFC takes in a IStream object.
    I'm not sure if there is an equivalent class I could use to pass in as that parameter in C#??? any COM l33ts out there?
    nvm it turns out that you have to implement the istream interface... there isnt a class that implements it as far as i could figure out
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: COM object needing a STREAM class

    The System.Runtime.InteropServices.ComTypes.IStream interface is the managed equivalent of that unmanaged interface. You need to define a class that implements that interface.

    What is this object supposed to represent anyway? You may be able to inherit an existing managed class that provides much of the functionality already and simply provide methods that pass through to the existing methods.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width