예제 #1
0
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
{
        TRACE("(%d)\n", dolock);

        if (dolock)
                DMSYNTH_LockModule();
        else
                DMSYNTH_UnlockModule();

        return S_OK;
}
예제 #2
0
파일: synth.c 프로젝트: howard5888/wineT
static ULONG WINAPI IDirectMusicSynth8Impl_Release (LPDIRECTMUSICSYNTH8 iface) {
	IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
	ULONG refCount = InterlockedDecrement(&This->ref);

	TRACE("(%p)->(ref before=%lu)\n", This, refCount + 1);

	if (!refCount) {
		HeapFree(GetProcessHeap(), 0, This);
	}

	DMSYNTH_UnlockModule();
	
	return refCount;
}
예제 #3
0
파일: synthsink.c 프로젝트: AndreRH/wine
static ULONG WINAPI IDirectMusicSynthSinkImpl_Release(LPDIRECTMUSICSYNTHSINK iface)
{
    IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface);
    ULONG ref = InterlockedDecrement(&This->ref);

    TRACE("(%p)->(): new ref = %u\n", This, ref);

    if (!ref) {
        if (This->latency_clock)
            IReferenceClock_Release(This->latency_clock);
        HeapFree(GetProcessHeap(), 0, This);
        DMSYNTH_UnlockModule();
    }

    return ref;
}
예제 #4
0
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
{
        DMSYNTH_UnlockModule();

        return 1; /* non-heap based object */
}