DllCanUnloadNow fix.

Fixed ObjRefCount for EnumPins.
This commit is contained in:
Maarten Lankhorst 2005-05-18 15:31:24 +00:00 committed by Alexandre Julliard
parent b96eb4d3b0
commit 30d5120a35
2 changed files with 4 additions and 4 deletions

View File

@ -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,9 +104,8 @@ static ULONG WINAPI IEnumPinsImpl_Release(IEnumPins * iface)
if (!refCount)
{
CoTaskMemFree(This);
return 0;
ObjectRefCount(FALSE);
}
else
return refCount;
}

View File

@ -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;
}