Commit f630fb4f authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

wiaservc: Return pointer to vtbl instead of implementation in wiadevmgr_Constructor.

parent 05757794
......@@ -70,19 +70,19 @@ WIASERVC_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter,
REFIID riid, LPVOID *ppvObj)
{
HRESULT res;
IUnknown *punk = NULL;
IWiaDevMgr *devmgr = NULL;
TRACE("IID: %s\n", debugstr_guid(riid));
if (pUnkOuter)
return CLASS_E_NOAGGREGATION;
res = wiadevmgr_Constructor((LPVOID*) &punk);
res = wiadevmgr_Constructor(&devmgr);
if (FAILED(res))
return res;
res = IUnknown_QueryInterface(punk, riid, ppvObj);
IUnknown_Release(punk);
res = IWiaDevMgr_QueryInterface(devmgr, riid, ppvObj);
IWiaDevMgr_Release(devmgr);
return res;
}
......
......@@ -164,7 +164,7 @@ static const IWiaDevMgrVtbl WIASERVC_IWiaDevMgr_Vtbl =
wiadevmgr_AddDeviceDlg
};
HRESULT wiadevmgr_Constructor(LPVOID *ppObj)
HRESULT wiadevmgr_Constructor(IWiaDevMgr **ppObj)
{
wiadevmgr *This;
TRACE("(%p)\n", ppObj);
......@@ -173,7 +173,7 @@ HRESULT wiadevmgr_Constructor(LPVOID *ppObj)
{
This->IWiaDevMgr_iface.lpVtbl = &WIASERVC_IWiaDevMgr_Vtbl;
This->ref = 1;
*ppObj = This;
*ppObj = &This->IWiaDevMgr_iface;
return S_OK;
}
*ppObj = NULL;
......
......@@ -34,7 +34,7 @@ typedef struct
LONG ref;
} wiadevmgr;
HRESULT wiadevmgr_Constructor(LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT wiadevmgr_Constructor(IWiaDevMgr **ppObj) DECLSPEC_HIDDEN;
/* Little helper functions */
static inline char *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment