Re: How to use VARIANT Structure of C on MAC OSX and XCODE 2.2...............
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On May 8, 2006, at 3:04 AM, Jonas Maebe wrote: VARIANT V; V.vt = VAR_INT; Okay, you're hosed. This is not a feature of the language. - boyd Boyd Waters Socorro, New Mexico _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com It gives error as VAR_INT is not declared and vt is of non type void *. 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. smime.p7s
participants (1)
-
Boyd Waters