Commit 30d5120a authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

DllCanUnloadNow fix.

Fixed ObjRefCount for EnumPins.
parent b96eb4d3
......@@ -58,6 +58,7 @@ HRESULT IEnumPinsImpl_Construct(const ENUMPINDETAILS * pDetails, IEnumPins ** pp
pEnumPins->uIndex = 0;
CopyMemory(&pEnumPins->enumPinDetails, pDetails, sizeof(ENUMPINDETAILS));
*ppEnum = (IEnumPins *)(&pEnumPins->lpVtbl);
ObjectRefCount(TRUE);
return S_OK;
}
......@@ -103,10 +104,9 @@ static ULONG WINAPI IEnumPinsImpl_Release(IEnumPins * iface)
if (!refCount)
{
CoTaskMemFree(This);
return 0;
ObjectRefCount(FALSE);
}
else
return refCount;
return refCount;
}
static HRESULT WINAPI IEnumPinsImpl_Next(IEnumPins * iface, ULONG cPins, IPin ** ppPins, ULONG * pcFetched)
......
......@@ -195,7 +195,7 @@ HRESULT WINAPI QCAP_DllCanUnloadNow(void)
{
TRACE("\n");
if (objects_ref == 0 || server_locks == 0)
if (objects_ref == 0 && server_locks == 0)
return S_OK;
return S_FALSE;
}
......
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