• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to use VARIANT Structure of C on MAC OSX and XCODE 2.2...............
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use VARIANT Structure of C on MAC OSX and XCODE 2.2...............


  • Subject: Re: How to use VARIANT Structure of C on MAC OSX and XCODE 2.2...............
  • From: Boyd Waters <email@hidden>
  • Date: Mon, 8 May 2006 15:37:40 -0600

On May 8, 2006, at 3:04 AM, Jonas Maebe wrote:


VARIANT V;

V.vt = VAR_INT;

It gives error as VAR_INT is not declared and vt is of non type void *.


Okay, you're hosed. This is not a feature of the language.


Indeed, it's a feature of some standard Windows library. It's possible to implement support for it in any language (also on non- Windows platforms), but that's quite a bit of work. I don't know of a pure C implementation.



Sorry, I can't recall if you need interoperability with Microsoft implementations.


Mozilla XPCOM might be an example implementation of this in C++ that works well with GCC.
http://www.xulplanet.com/references/xpcomref/ifaces/nsIVariant.html


Mozilla basically took the base Microsoft COM architecture and wrote a C++ implementation, which they later open-sourced.

You can write a VARIANT implementation that is very inefficient, and I suppose you can write a better one if you pay attention to data- alignment issues. So it might be worthwhile to examine (or re-use) something like XPCOM if you must.

- boyd

Boyd Waters
Socorro, New Mexico

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: How to use VARIANT Structure of C on MAC OSX and XCODE 2.2............... (From: email@hidden (Peter Seebach))
 >Re: How to use VARIANT Structure of C on MAC OSX and XCODE 2.2............... (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: pthread_cancel()
  • Next by Date: RE: question for CFRunLoopStop()
  • Previous by thread: Re: How to use VARIANT Structure of C on MAC OSX and XCODE 2.2...............
  • Next by thread: RE: How to use VARIANT Structure of C on MAC OSX and XCODE2.2...............
  • Index(es):
    • Date
    • Thread