Nikolay Sivov nsivov@codeweavers.com writes:
+#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc))) +#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
Don't do that, follow the standard impl_from_xxx inline function pattern.