/********************************************************************** * DEVENUM_ICreateDevEnum_Release (also IUnknown) */ static ULONG WINAPI DEVENUM_ICreateDevEnum_Release(ICreateDevEnum * iface) { TRACE("\n"); DEVENUM_UnlockModule(); return 1; /* non-heap based object */ }
/********************************************************************** * DEVENUM_IClassFactory_Release (also IUnknown) */ static ULONG WINAPI DEVENUM_IClassFactory_Release(LPCLASSFACTORY iface) { TRACE("\n"); DEVENUM_UnlockModule(); return 1; /* non-heap based object */ }
/********************************************************************** * DEVENUM_IClassFactory_LockServer */ static HRESULT WINAPI DEVENUM_IClassFactory_LockServer( LPCLASSFACTORY iface, BOOL fLock) { TRACE("\n"); if (fLock) DEVENUM_LockModule(); else DEVENUM_UnlockModule(); return S_OK; }
static ULONG WINAPI DEVENUM_IMediaCatMoniker_Release(IMoniker *iface) { MediaCatMoniker *This = impl_from_IMoniker(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); if (ref == 0) { RegCloseKey(This->hkey); CoTaskMemFree(This); DEVENUM_UnlockModule(); } return ref; }
/********************************************************************** * DEVENUM_IMediaCatMoniker_Release (also IUnknown) */ static ULONG WINAPI DEVENUM_IMediaCatMoniker_Release(LPMONIKER iface) { MediaCatMoniker *This = (MediaCatMoniker *)iface; ULONG ref; TRACE("\n"); ref = InterlockedDecrement(&This->ref); if (ref == 0) { RegCloseKey(This->hkey); CoTaskMemFree(This); DEVENUM_UnlockModule(); } return ref; }
/********************************************************************** * DEVENUM_IPropertyBag_Release (also IUnknown) */ static ULONG WINAPI DEVENUM_IPropertyBag_Release(LPPROPERTYBAG iface) { RegPropBagImpl *This = impl_from_IPropertyBag(iface); ULONG ref; TRACE("(%p)->() ReleaseThis->ref from %d\n", iface, This->ref); ref = InterlockedDecrement(&This->ref); if (ref == 0) { RegCloseKey(This->hkey); CoTaskMemFree(This); DEVENUM_UnlockModule(); } return ref; }
/********************************************************************** * DEVENUM_IEnumMoniker_Release (also IUnknown) */ static ULONG WINAPI DEVENUM_IEnumMoniker_Release(LPENUMMONIKER iface) { EnumMonikerImpl *This = (EnumMonikerImpl *)iface; ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p)->() Release from %d\n", iface, ref + 1); if (!ref) { RegCloseKey(This->hkey); CoTaskMemFree(This); DEVENUM_UnlockModule(); return 0; } return ref; }
static ULONG WINAPI DEVENUM_IEnumMoniker_Release(IEnumMoniker *iface) { EnumMonikerImpl *This = impl_from_IEnumMoniker(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); if (!ref) { if(This->special_hkey) RegCloseKey(This->special_hkey); RegCloseKey(This->hkey); CoTaskMemFree(This); DEVENUM_UnlockModule(); return 0; } return ref; }