DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: C and C++ COM Object Interaction

  1. #1
    Join Date
    Jul 2009

    C and C++ COM Object Interaction

    I was wondering whether it is possible to write a C utility that would actually make use of a COM object created using C++. All I need to do is to use the methods exposed in the COM in a C console application.

    Any help or direction for related articles is appreciated.

    Thanks !

  2. #2
    Join Date
    Nov 2003
    Technically, it might be possible but that's going to be a very, very difficult task. you need to know what the mangled named of the member functions are, you will also have to ensure that the objects are initialized and destroyed properly, and you will need to ensure that the code is completely exception free.
    Danny Kalev

  3. #3
    Join Date
    Jul 2009
    Thanks for the confirmation ! Can you please direct me towards some articles in this respect ? I mean, I searched over many technical forums and sites but was unable to stumble upon one that actually speaks about the steps involved or that has a sample code.

    Thanks !

  4. #4
    Join Date
    Nov 2003
    With respect to C -> C++ integration see:
    The C++ Object Model (including the mangled names of functions) is discussed here:

    As for COM -- MSDN would be a good starting point. You will also need to bear in mind that the exact implementation details vary from compiler to compiler because the Application Binary Interface of VC++ has changed several times.
    Danny Kalev

Similar Threads

  1. Objects disposed incorrectly
    By Osiris43 in forum .NET
    Replies: 1
    Last Post: 08-04-2006, 12:15 PM
  2. Scope of an Object
    By sivsu in forum C++
    Replies: 9
    Last Post: 03-27-2005, 02:14 PM
  3. Replies: 1
    Last Post: 02-22-2005, 10:12 PM
  4. Replies: 7
    Last Post: 10-24-2002, 06:33 AM
  5. Breaking reference in an object model???
    By Michael in forum .NET
    Replies: 0
    Last Post: 08-06-2002, 12:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center