Compartir a través de


3.1.1.5.6.1.2 IRemUnknown::RemAddRef (Opnum 4 )

The RemAddRef (Opnum 4) method requests that a specified number of reference counts be incremented on a specified number of interfaces on the object.

 HRESULT RemAddRef(
   [in] unsigned short cInterfaceRefs,
   [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[],
   [out, size_is(cInterfaceRefs)] HRESULT* pResults
 );

cInterfaceRefs:  This MUST specify the number of elements sent in the InterfaceRefs parameter and returned in the pResults parameter.

InterfaceRefs:  This MUST specify an array of REMINTERFACEREF structures, each of which specifies the number of public and private references to be added to the interface identified by the IPID.

pResults:  This MUST contain an array of HRESULTs specifying the respective success or failure of the RemAddRef operation for each REMINTERFACEREF element.

When processing this ORPC call, the object exporter MUST do the following:

For each REMINTERFACEREF element in the InterfaceRefs array argument:

  • It MUST look up REMINTERFACEREF.ipid in the IPID table to find the IPID entry. If the entry is not found, it MUST set the return code in the corresponding pResults array to CO_E_OBJNOTREG (as specified in [MS-ERREF] section 2.1).

  • If the entry is found, the object exporter MUST do the following:

    • It MUST increment the public reference count in the IPID entry by REMINTERFACEREF.cPublicRefs.

    • It MUST increment the private reference count in the IPID entry by REMINTERFACEREF.cPrivateRefs.

    •  It SHOULD associate the private reference counts exclusively for use by the client.

    • It MUST set the return code in the corresponding pResults array to a success code of zero.<48>