Re: COM implementation clean up

2010-11-24 Thread Michael Stefaniuc
Hello, Alexander Kochetkov wrote: > The code like > static inline MyObject *impl_from_IMyInterface(IMyInterface *iface) > { > return (MyObject*)((char*)iface - FIELD_OFFSET(MyObject, > IMyInterface_iface)); > } > > could be replaced with > static inline MyObject *impl_from_IMyInterface(IMyInt

Re: COM implementation clean up

2010-11-24 Thread Alexander Kochetkov
Hi all, The code like static inline MyObject *impl_from_IMyInterface(IMyInterface *iface) { return (MyObject*)((char*)iface - FIELD_OFFSET(MyObject, IMyInterface_iface)); } could be replaced with static inline MyObject *impl_from_IMyInterface(IMyInterface *iface) { return container_of(MyO

COM implementation clean up

2010-11-23 Thread Jacek Caban
Hi all, As many of you probably know, we currently have no standard way for implementing COM objects in Wine. We use different techniques all over the place. Some of them are better, other are worse or even ugly. Together with Alexandre, we've chosen the technique that we believe is the best