- LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj
-) {
- IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
- TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
-
- if (pOuter)
- return CLASS_E_NOAGGREGATION;
-
- if (ppobj == NULL) {
- WARN("invalid parameter\n");
- return DSERR_INVALIDPARAM;
- }
-
- *ppobj = NULL;
-
- if ( IsEqualIID( &IID_IDirectSound, riid ) )
- return DSOUND_Create((LPDIRECTSOUND*)ppobj,pOuter);
-
- if ( IsEqualIID( &IID_IDirectSound8, riid ) )
- return DSOUND_Create8((LPDIRECTSOUND8*)ppobj,pOuter);
-
- WARN("(%p,%p,%s,%p) Interface not found!\n",This,pOuter,debugstr_guid(riid),ppobj);
- return E_NOINTERFACE;
-}
-
-static HRESULT WINAPI DSCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
- IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
- FIXME("(%p)->(%d),stub!\n",This,dolock);
- return S_OK;
-}
-
-static const IClassFactoryVtbl DSCF_Vtbl = {
- DSCF_QueryInterface,
- DSCF_AddRef,
- DSCF_Release,
- DSCF_CreateInstance,
- DSCF_LockServer
-};
-
-static IClassFactoryImpl DSOUND_CF = { &DSCF_Vtbl, 1 };
-
-/*******************************************************************************
- * DirectSoundPrivate ClassFactory
- */
-
-static HRESULT WINAPI
-DSPCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
- IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
-
- FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj);
- return E_NOINTERFACE;
-}
-
-static ULONG WINAPI DSPCF_AddRef(LPCLASSFACTORY iface)
-{
- IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
- ULONG ref = InterlockedIncrement(&(This->ref));
- TRACE("(%p) ref was %ld\n", This, ref - 1);
- return ref;
-}
-
-static ULONG WINAPI DSPCF_Release(LPCLASSFACTORY iface)