qedit.dll: Add minimal stubs for NullRenderer and SampleGrabber

Alexandre Julliard julliard at winehq.org
Mon Dec 21 09:05:25 CST 2009


Paul Chitescu <paulc at voip.null.ro> writes:

> Changelog:
> 	qedit.dll: Add minimal stubs for NullRenderer and SampleGrabber.
>
> It doesn't make much sense to break this patch in two since most applications 
> connect a SampleGrabber to a NullRenderer to capture frames.

That doesn't mean you can't split the patch.

> +#define DEF_COMMON(iface)\
> +static ULONG WINAPI NullRenderer_ ## iface ## _AddRef(iface *ptr)\
> +{\
> +    return InterlockedIncrement(&GET_THIS(ptr,iface)->refCount);\
> +}\
> +static ULONG WINAPI NullRenderer_ ## iface ## _Release(iface *ptr)\
> +{\
> +    NR_Impl *This = GET_THIS(ptr,iface);\
> +    ULONG refCount = InterlockedDecrement(&This->refCount);\
> +    if (refCount == 0) \
> +    {\
> +        NullRenderer_cleanup(This);\
> +        CoTaskMemFree(This);\
> +        return 0;\
> +    }\
> +    return refCount;\
> +}\
> +static HRESULT WINAPI NullRenderer_ ## iface ## _QueryInterface(iface *ptr, REFIID riid, void **ppvObject)\
> +{\
> +    return NullRenderer_query(GET_THIS(ptr,iface), riid, ppvObject);\
> +}
> +
> +/* Macro to put common IUnknown pointers in interface's vtable */
> +#define VTBL_COMMON(iface)\
> +NullRenderer_ ## iface ## _QueryInterface,\
> +NullRenderer_ ## iface ## _AddRef,\
> +NullRenderer_ ## iface ## _Release,

Please don't add ugly macros like those, spell things out explicitly.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list