4.4 IRemUnknown::RemRelease

Release ownership of one or more reference counts on one or more IPIDs managed by the corresponding OXID.

If cPrivateRefs is not zero for all IPIDs, the call to RemRelease must be made securely.  For each IPID, DCOM maintains a table of reference counts indexed by the client identity (name, authn svc, authz svc).  All public references are stored in one entry.  Any call to RemRelease can release

public references.  Private references can only be released by the client that added them.

Argument Type Semantic
CRefs Unsigned short The size of the rgRefs array.
RgRefs REMINTERFACEREF[] An array of REMINTERFACEREFs, cRefs large. Each IPID indicates an interface managed by this OXID on whom more reference counts are being returned. The corresponding reference count, which may not be zero (and thus is one or more), indicates the number of reference counts returned on that IPID.

ReturnValue Meaning
S_OK Success. An attempt was made to release each of the requested interface references.
E_INVALIDARG One or more of the IPIDs indicated were not in fact managed by this OXID, or one or more of the requested reference counts was zero. None of the offered reference counts have been accepted by the server; the call is a no-op.
E_UNEXPECTED An unspecified error occurred. It is unknown whether any or all of the offered reference counts have been accepted.