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, ...@@ -70,19 +70,19 @@ WIASERVC_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter,
REFIID riid, LPVOID *ppvObj) REFIID riid, LPVOID *ppvObj)
{ {
HRESULT res; HRESULT res;
IUnknown *punk = NULL; IWiaDevMgr *devmgr = NULL;
TRACE("IID: %s\n", debugstr_guid(riid)); TRACE("IID: %s\n", debugstr_guid(riid));
if (pUnkOuter) if (pUnkOuter)
return CLASS_E_NOAGGREGATION; return CLASS_E_NOAGGREGATION;
res = wiadevmgr_Constructor((LPVOID*) &punk); res = wiadevmgr_Constructor(&devmgr);
if (FAILED(res)) if (FAILED(res))
return res; return res;
res = IUnknown_QueryInterface(punk, riid, ppvObj); res = IWiaDevMgr_QueryInterface(devmgr, riid, ppvObj);
IUnknown_Release(punk); IWiaDevMgr_Release(devmgr);
return res; return res;
} }
......
...@@ -164,7 +164,7 @@ static const IWiaDevMgrVtbl WIASERVC_IWiaDevMgr_Vtbl = ...@@ -164,7 +164,7 @@ static const IWiaDevMgrVtbl WIASERVC_IWiaDevMgr_Vtbl =
wiadevmgr_AddDeviceDlg wiadevmgr_AddDeviceDlg
}; };
HRESULT wiadevmgr_Constructor(LPVOID *ppObj) HRESULT wiadevmgr_Constructor(IWiaDevMgr **ppObj)
{ {
wiadevmgr *This; wiadevmgr *This;
TRACE("(%p)\n", ppObj); TRACE("(%p)\n", ppObj);
...@@ -173,7 +173,7 @@ HRESULT wiadevmgr_Constructor(LPVOID *ppObj) ...@@ -173,7 +173,7 @@ HRESULT wiadevmgr_Constructor(LPVOID *ppObj)
{ {
This->IWiaDevMgr_iface.lpVtbl = &WIASERVC_IWiaDevMgr_Vtbl; This->IWiaDevMgr_iface.lpVtbl = &WIASERVC_IWiaDevMgr_Vtbl;
This->ref = 1; This->ref = 1;
*ppObj = This; *ppObj = &This->IWiaDevMgr_iface;
return S_OK; return S_OK;
} }
*ppObj = NULL; *ppObj = NULL;
......
...@@ -34,7 +34,7 @@ typedef struct ...@@ -34,7 +34,7 @@ typedef struct
LONG ref; LONG ref;
} wiadevmgr; } wiadevmgr;
HRESULT wiadevmgr_Constructor(LPVOID *ppObj) DECLSPEC_HIDDEN; HRESULT wiadevmgr_Constructor(IWiaDevMgr **ppObj) DECLSPEC_HIDDEN;
/* Little helper functions */ /* Little helper functions */
static inline char * 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