Subject: Re: C COM objects?
From: "Michael D. Crawford" <[email-masked]>
To: [email-masked]
Date: Thu, 29 Jan 2004 20:29:11 -0500

I tried a couple of times to get ZooLib (http://www.zoolib.org/) to build with 
Cygwin.  ZooLib is a cross-platform application framework, and on Windows uses 
COM to handle the clipboard and drag and drop.

I believe that actually you CAN get COM to work with gcc, even from C++, but 
you're going to need to build gcc and its libraries a different way than the way 
it's normally built by the Cygwin developers.  I'm afraid I don't remember what 
is needed, but it has something to do with vtable thunking.  You need to set 
whatever option deals with that differently than the way it's built normally by 
the cygwin folks.

I'm sorry I can't be more specific, but it's been a while.  Maybe if you search 
for my email address or the word "zoolib" in the list archives you can find 
where I asked about this before.

It's actually not very hard at all to do COM programming in C.  A COM interface 
is little more than a structure full of pointers to functions.  I have some 
sample code from when I gave a talk on writing Mac OS X user clients at MacHack 
last year.  Yes, Apple's Mac OS X actually uses COM!  Who would have thought. 
I've been meaning for months to post the source on my website but I got to fix 
it up before I do.  I'll go have a look and maybe I can post some snippets as a 
reply to this thread.

Mike
-- 
Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting
http://www.goingware.com
[email-masked]

   Tilting at Windmills for a Better Tomorrow.

     "I give you this one rule of conduct. Do what you will, but speak
      out always. Be shunned, be hated, be ridiculed, be scared,
      be in doubt, but don't be gagged."
      -- John J. Chapman, "Make a Bonfire of Your Reputations"
         http://www.goingware.com/reputation/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/