dsound: Cleanup IKsPrivatePropertySetImpl_Create().
This commit is contained in:
parent
054d930bb7
commit
1555aebf1e
|
@ -724,7 +724,7 @@ static IClassFactoryImpl DSOUND_CF[] = {
|
||||||
{ { &DSCF_Vtbl }, &CLSID_DirectSoundCapture, DSOUND_CaptureCreate },
|
{ { &DSCF_Vtbl }, &CLSID_DirectSoundCapture, DSOUND_CaptureCreate },
|
||||||
{ { &DSCF_Vtbl }, &CLSID_DirectSoundCapture8, DSOUND_CaptureCreate8 },
|
{ { &DSCF_Vtbl }, &CLSID_DirectSoundCapture8, DSOUND_CaptureCreate8 },
|
||||||
{ { &DSCF_Vtbl }, &CLSID_DirectSoundFullDuplex, DSOUND_FullDuplexCreate },
|
{ { &DSCF_Vtbl }, &CLSID_DirectSoundFullDuplex, DSOUND_FullDuplexCreate },
|
||||||
{ { &DSCF_Vtbl }, &CLSID_DirectSoundPrivate, (FnCreateInstance)IKsPrivatePropertySetImpl_Create },
|
{ { &DSCF_Vtbl }, &CLSID_DirectSoundPrivate, IKsPrivatePropertySetImpl_Create },
|
||||||
{ { NULL }, NULL, NULL }
|
{ { NULL }, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,7 @@ struct IDirectSoundCaptureBufferImpl
|
||||||
int nrofnotifies;
|
int nrofnotifies;
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, IKsPropertySet **piks) DECLSPEC_HIDDEN;
|
HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -619,23 +619,24 @@ static const IKsPropertySetVtbl ikspvt = {
|
||||||
IKsPrivatePropertySetImpl_QuerySupport
|
IKsPrivatePropertySetImpl_QuerySupport
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT IKsPrivatePropertySetImpl_Create(
|
HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, void **ppv)
|
||||||
REFIID riid,
|
|
||||||
IKsPropertySet **piks)
|
|
||||||
{
|
{
|
||||||
IKsPrivatePropertySetImpl *iks;
|
IKsPrivatePropertySetImpl *iks;
|
||||||
TRACE("(%s, %p)\n", debugstr_guid(riid), piks);
|
HRESULT hr;
|
||||||
|
|
||||||
if (!IsEqualIID(riid, &IID_IUnknown) &&
|
TRACE("(%s, %p)\n", debugstr_guid(riid), ppv);
|
||||||
!IsEqualIID(riid, &IID_IKsPropertySet)) {
|
|
||||||
*piks = 0;
|
iks = HeapAlloc(GetProcessHeap(), 0, sizeof(*iks));
|
||||||
return E_NOINTERFACE;
|
if (!iks) {
|
||||||
|
WARN("out of memory\n");
|
||||||
|
return DSERR_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
iks = HeapAlloc(GetProcessHeap(),0,sizeof(*iks));
|
|
||||||
iks->ref = 1;
|
iks->ref = 1;
|
||||||
iks->IKsPropertySet_iface.lpVtbl = &ikspvt;
|
iks->IKsPropertySet_iface.lpVtbl = &ikspvt;
|
||||||
|
|
||||||
*piks = &iks->IKsPropertySet_iface;
|
hr = IKsPropertySet_QueryInterface(&iks->IKsPropertySet_iface, riid, ppv);
|
||||||
return S_OK;
|
IKsPropertySet_Release(&iks->IKsPropertySet_iface);
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue