3.1.2.5.2.3 IActivation::RemoteActivation, IRemoteSCMActivator::RemoteGetClassObject, IRemoteSCMActivator::RemoteCreateInstance

These three methods all perform the same conceptual operations and so are specified here together.

When processing any of these three method calls:

  • The object resolver MAY compare the client's credentials against a set of implementation-specific permissions.<60> If the permissions do not allow access to the client credentials, the object resolver MUST return E_ACCESSDENIED or ERROR_ACCESS_DENIED. The return error code is chosen in an implementation-specific manner.<61>

  • The object resolver MUST use the COMVERSION of the client specified in the ORPCTHIS parameter to perform capability negotiation as described in section 1.7. In particular, the object resolver MUST return RPC_E_VERSION_MISMATCH (as specified in [MS-ERREF] section 2.1) if the client has a higher minor COM version or a different COM major version.

  • The object resolver MUST look up the CLSID entry for the CLSID specified by the client. If the entry is not found:

    • The object resolver MUST start an object exporter for the CLSID using an implementation-specific mechanism.

    • The object resolver MUST create the CLSID entry specifying the CLSID, the OXID entry of the exporter and the application-specific state of the class factory interface for the CLSID.

  • The object resolver MUST invoke the application-specific state of the class factory interface, in an implementation-specific manner, to create the object in its object exporter and marshal an object reference (see section 3.2.4.3) for each IID specified by the client.

  • If the RPC binding information in the OXID entry of the object exporter of the object is not present or does not contain the RPC protocol sequence that the client specified, the object resolver MUST instruct the object exporter to listen on the RPC protocol, as specified in [C706] section 3.1.20 (rpc_server_use_protseq).

When processing the IRemoteSCMActivator::RemoteGetClassObject or the IRemoteSCMActivator::RemoteCreateInstance method calls, the object resolver MUST additionally perform all of the following checks before creating the object exporter:

  • If the SPD_FLAG _USE_CONSOLE_SESSION flag is not set in the dwFlags field of the SpecialPropertiesData structure (section 2.2.22.2.2) and if the dwSessionID field of the SpecialPropertiesData structure does not contain 0xFFFFFFFF, the object resolver SHOULD<62> attempt to create the object exporter in the logon session whose identifier is specified in the dwSessionID field. If the object resolver cannot meet this requirement, it MUST return CO_E_RUNAS_LOGON_FAILURE. If the dwSessionID field contains 0xFFFFFFFF, the object resolver SHOULD attempt to create the object exporter in any logon session.

  • If the SPD_FLAG_USE_CONSOLE_SESSION flag is set in the dwFlags field of the SpecialPropertiesData structure (section 2.2.22.2.2), the object resolver SHOULD<63> attempt to create the object exporter in the console logon session. If the object resolver cannot meet this requirement, it MUST return CO_E_RUNAS_LOGON_FAILURE.

  • If the ACTVFLAGS_DISABLE_AAA flag is set in the actvFlags field of the InstantiationInfoData structure (section 2.2.22.2.1), the object resolver MUST return E_ACCESSDENIED if the object exporter is configured to run under the client's identity. The object resolver determines the configuration of the identity of the object exporter in an implementation-specific manner.<64>

  • If the ACTVFLAGS_ACTIVATE_32_BIT_SERVER flag is set in the actvFlags field of the InstantiationInfoData structure (section 2.2.22.2.1), the object resolver SHOULD<65> create the object exporter in the 32-bit address space and MUST return REGDB_E_CLASSNOTREG if it cannot meet this requirement.

    If the ACTVFLAGS_ACTIVATE_64_BIT_SERVER flag is set in the actvFlags field of the InstantiationInfoData structure (section 2.2.22.2.1), the object resolver SHOULD<66> create the object exporter in the 64-bit address space and MUST return REGDB_E_CLASSNOTREG if it cannot meet this requirement.

  • If the ACTVFLAGS_NO_FAILURE_LOG flag is set in the actvFlags field of the InstantiationInfoData structure (section 2.2.22.2.1), the object resolver SHOULD NOT<67> log any errors that occur during the activation.

  • If the object class has an application identifier (section 3.1.2.1), the object resolver MUST do the following:

    • The object resolver MUST read the Context structure (section 2.2.20) contained in pIFDClientCtx field.

    • If the dwNumExtents field or the cbExtents field of the Context structure is not set to 0x00000000, the object resolver MUST return RPC_E_INVALID_OBJREF.

    • The object resolver MUST supply the client context properties contained in the PROPMARSHALHEADER array (section 2.2.20.1) contained in the Context structure (section 2.2.20) to the application or the higher-layer protocol specified by the application identifier of the object class.

    • If the pIFDPrototypeCtx field contained in the ActivationContextInfoData structure (section 2.2.22.2.5) is not NULL, the object resolver MUST read the Context structure (section 2.2.20) contained in pIFDPrototypeCtx field.

    • If the dwNumExtents field or the cbExtents field of the Context structure is not set to 0x00000000, the object resolver MUST return RPC_E_INVALID_OBJREF.

    • The object resolver MUST supply the prototype context properties contained in the PROPMARSHALHEADER array (section 2.2.20.1) contained in the Context structure (section 2.2.20) to the application or the higher-layer protocol specified by the application identifier of the object class.

  • The object resolver MUST return the following:

    • An array of object references, one for each IID.

    • The IPID of the IRemUnknown interface of the object exporter.

    • The COMVERSION of the object exporter.

    • The RPC bindings of the object exporter.