qedit: Pass an IUnknown pointer to the object creation functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ed0f2909ff
commit
98143898db
|
@ -42,7 +42,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
|||
typedef struct {
|
||||
IClassFactory IClassFactory_iface;
|
||||
LONG ref;
|
||||
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
|
||||
HRESULT (*create_instance)(IUnknown *outer, IUnknown **out);
|
||||
} IClassFactoryImpl;
|
||||
|
||||
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
|
||||
|
@ -53,15 +53,15 @@ static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
|
|||
struct object_creation_info
|
||||
{
|
||||
const CLSID *clsid;
|
||||
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
|
||||
HRESULT (*create_instance)(IUnknown *outer, IUnknown **out);
|
||||
};
|
||||
|
||||
static const struct object_creation_info object_creation[] =
|
||||
{
|
||||
{ &CLSID_AMTimeline, AMTimeline_create },
|
||||
{ &CLSID_MediaDet, MediaDet_create },
|
||||
{ &CLSID_NullRenderer, NullRenderer_create },
|
||||
{ &CLSID_SampleGrabber, SampleGrabber_create },
|
||||
{&CLSID_AMTimeline, timeline_create},
|
||||
{&CLSID_MediaDet, media_detector_create},
|
||||
{&CLSID_NullRenderer, null_renderer_create},
|
||||
{&CLSID_SampleGrabber, sample_grabber_create},
|
||||
};
|
||||
|
||||
static HRESULT WINAPI DSCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj)
|
||||
|
@ -109,7 +109,7 @@ static HRESULT WINAPI DSCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter
|
|||
if (pOuter && !IsEqualGUID(&IID_IUnknown, riid))
|
||||
return E_NOINTERFACE;
|
||||
|
||||
hres = This->pfnCreateInstance(pOuter, (LPVOID *) &punk);
|
||||
hres = This->create_instance(pOuter, &punk);
|
||||
if (SUCCEEDED(hres)) {
|
||||
hres = IUnknown_QueryInterface(punk, riid, ppobj);
|
||||
IUnknown_Release(punk);
|
||||
|
@ -186,7 +186,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|||
factory->IClassFactory_iface.lpVtbl = &DSCF_Vtbl;
|
||||
factory->ref = 1;
|
||||
|
||||
factory->pfnCreateInstance = object_creation[i].pfnCreateInstance;
|
||||
factory->create_instance = object_creation[i].create_instance;
|
||||
|
||||
*ppv = &factory->IClassFactory_iface;
|
||||
return S_OK;
|
||||
|
|
|
@ -637,7 +637,8 @@ static const IMediaDetVtbl IMediaDet_VTable =
|
|||
MediaDet_EnterBitmapGrabMode,
|
||||
};
|
||||
|
||||
HRESULT MediaDet_create(IUnknown * pUnkOuter, LPVOID * ppv) {
|
||||
HRESULT media_detector_create(IUnknown *pUnkOuter, IUnknown **ppv)
|
||||
{
|
||||
MediaDetImpl* obj = NULL;
|
||||
|
||||
TRACE("(%p,%p)\n", pUnkOuter, ppv);
|
||||
|
|
|
@ -62,7 +62,7 @@ static const struct strmbase_renderer_ops renderer_ops =
|
|||
.renderer_destroy = null_renderer_destroy,
|
||||
};
|
||||
|
||||
HRESULT NullRenderer_create(IUnknown *outer, void **out)
|
||||
HRESULT null_renderer_create(IUnknown *outer, IUnknown **out)
|
||||
{
|
||||
HRESULT hr;
|
||||
NullRendererImpl *pNullRenderer;
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
#include "dshow.h"
|
||||
#include "qedit.h"
|
||||
|
||||
HRESULT AMTimeline_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
|
||||
HRESULT MediaDet_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
|
||||
HRESULT NullRenderer_create(IUnknown *outer, void **out) DECLSPEC_HIDDEN;
|
||||
HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
|
||||
HRESULT timeline_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||
HRESULT media_detector_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||
HRESULT null_renderer_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||
HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif /* __QEDIT_PRIVATE_INCLUDED__ */
|
||||
|
|
|
@ -634,7 +634,7 @@ static const struct strmbase_source_ops source_ops =
|
|||
.pfnDecideAllocator = sample_grabber_source_DecideAllocator,
|
||||
};
|
||||
|
||||
HRESULT SampleGrabber_create(IUnknown *outer, void **out)
|
||||
HRESULT sample_grabber_create(IUnknown *outer, IUnknown **out)
|
||||
{
|
||||
SG_Impl* obj = NULL;
|
||||
ISeekingPassThru *passthru;
|
||||
|
|
|
@ -421,7 +421,7 @@ static const IAMTimelineVtbl IAMTimeline_VTable =
|
|||
Timeline_IAMTimeline_GetDefaultEffectB,
|
||||
};
|
||||
|
||||
HRESULT AMTimeline_create(IUnknown *pUnkOuter, LPVOID *ppv)
|
||||
HRESULT timeline_create(IUnknown *pUnkOuter, IUnknown **ppv)
|
||||
{
|
||||
TimelineImpl* obj = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue