Paul Chitescu paulc@voip.null.ro writes:
+/* Macro to get the SampleGrabber This pointer from interface pointer */ +#define GET_THIS(ptr,iface) ((SG_Impl *)((char *)(ptr) - FIELD_OFFSET(SG_Impl,iface ## _Vtbl)))
Please define an inline function for that sort of thing. Look at shelllink.c for examples.
On Wednesday 03 February 2010 11:57:37 am Alexandre Julliard wrote:
Paul Chitescu paulc@voip.null.ro writes:
+/* Macro to get the SampleGrabber This pointer from interface pointer */ +#define GET_THIS(ptr,iface) ((SG_Impl *)((char *)(ptr) -
FIELD_OFFSET(SG_Impl,iface ## _Vtbl)))
Please define an inline function for that sort of thing. Look at shelllink.c for examples.
-- Alexandre Julliard julliard@winehq.org
Ok, I did so - although it will take a while to rebuild all 5 patches.
What about calling AddRef() in QueryInterface() vs. calling InterlockedIncrement directly on the counter?
Paul
Paul Chitescu paulc@voip.null.ro writes:
Ok, I did so - although it will take a while to rebuild all 5 patches.
What about calling AddRef() in QueryInterface() vs. calling InterlockedIncrement directly on the counter?
AddRef is definitely better.