Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 29 Jan 2004 20:29:11 -0500 From: "Michael D. Crawford" Subject: Re: C COM objects? To: cygwin AT cygwin DOT com Message-id: <4019B367.8070906@goingware.com> Organization: GoingWare Inc. - Expert Software Development and Consulting MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-IsSubscribed: yes 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 crawford AT goingware DOT com 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/