Partager via


3.2.4.1.1.2 Issuing the Activation Request

The client MUST proceed to issue an activation request by:

  • Selecting the security parameters.

  • Selecting the activation interface.

  • Selecting the activation request parameters.

The client SHOULD specify security on the activation call. The client SHOULD use the SECURITYBINDING contained in the DUALSTRINGARRAY returned from the IObjectExporter::ServerAlive2 method to pick a security provider that is common to both the client and the object resolver, and that meets the client's security requirements.

The client MUST specify the default values for the following security settings:

The client MUST specify the credentials requested by the application, if supplied; otherwise, it MUST specify the credentials of the security principal of the application that is issuing the activation request as the default credentials for the activation call.

The client MUST specify the authentication level at least as high as what is requested by the application, that is, if one is requested. However, note that the client MAY raise the authentication level<80>. Otherwise, the client MUST specify a default authentication level that is obtained in an implementation-specific manner.<81>

The client MUST specify the impersonation level requested by the application, if one was supplied; otherwise, it MUST specify a default impersonation level of at least RPC_C_IMPL_LEVEL_IMPERSONATE (see [MS-RPCE] section 2.2.1.1.9).<82>

When using Kerberos and SPNEGO security providers, the client MUST specify the SPN requested by the application, if one was supplied; otherwise, it MUST specify an SPN of "RPCSS/<remote server name>", where <remote server name> is replaced by the remote server name passed by the higher-layer application or protocol to the activation request.

The client MUST select the interface used to make the activation request as follows:

  • If the server's COM version, as determined in section 3.2.4.1.1.1, is less than 5.6, the client MUST select the IActivation interface.

  • Otherwise, the client MUST select the IRemoteSCMActivator interface if the client requires the additional activation capabilities supported by the IRemoteSCMActivator interface over the IActivation interface.

  • Otherwise, the client MUST select the IActivation interface.

If the client selects the IActivation interface, it MUST specify the Mode parameter of the RemoteActivation method as follows:

  • If the DCOM application requires an interface on the class factory object, the client MUST set the Mode parameter to -1.

  • Otherwise, the client MUST set the Mode parameter to 0.

If the client selects the IRemoteSCMActivator interface, it MUST pick an Activation method as follows:

  • If the DCOM application requires an interface on the class factory object, the client MUST call the RemoteGetClassObject method.

  • Otherwise, the client MUST call the RemoteCreateInstance method.

  • It MUST set the pIFDClientCtx field of the ActivationContextInfoData structure (see section 2.2.22.2.5) to an OBJREF containing a marshaled Context structure (see section 2.2.20). It MUST create the Context structure as follows:

    • It MUST set the Count field of the Context structure to the number of client context properties supplied by the application or higher-layer protocol.

    • For each client context property, it MUST create a PropMarshalHeader array element as follows:

      • It MUST set the clsid field to GUID_NULL.

      • It MUST set the policyId field to the context property identifier supplied by the application or higher-layer protocol.

      • It MUST set the flags field to CPFLAGS_EXPOSE.

      • It MUST set the cb field to the size of the buffer supplied by the application or the higher-layer protocol.

      • It MUST set the ctxPropery field to the buffer supplied by the application or higher-layer protocol.

  • If the application or higher-layer protocol supplies no prototype context properties, the client MUST set the pIFDPrototypeCtx field of the ActivationContextInfoData structure (see section 2.2.22.2.5) to NULL. Otherwise, it MUST set the pIFDPrototypeCtx field to an OBJREF containing a marshaled Context structure (see section 2.2.20). It MUST create the Context structure as follows:

    • It MUST set the Count field of the Context structure to the number of prototype context properties supplied by the application or higher-layer protocol.

    • For each prototype context property, it MUST create a PropMarshalHeader array element as follows:

      • It MUST set the clsid field to GUID_NULL.

      • It MUST set the policyId field to the context property identifier supplied by the application or higher-layer protocol.

      • It MUST set the flags field to CPFLAGS_PROPAGATE.

      • It MUST set the cb field to the size of the buffer supplied by the application or the higher-layer protocol.

      • It MUST set the ctxPropery field to the buffer supplied by the application or higher-layer protocol.

The client MUST specify the remaining parameters common to both interfaces as follows:

  • The client MUST set the COMVERSION in the ORPCTHIS parameter to the value negotiated while determining the RPC binding information (see section 3.2.4.1.1.1).

  • The client MUST specify the CLSID supplied by the DCOM application.

  • The client MUST supply an array of RPC Protocol Sequence Identifiers that the client's object resolver listens on, as specified in section 3.1.2.3. The array SHOULD contain all such identifiers (as opposed to only a subset of them).

  • The client MUST specify an array of IIDs supplied by the DCOM application.

When the activation call returns successfully, the following data MUST be returned to the client:

  • An HRESULT indicating the overall result of the activation. If this is not success, the client MUST return the HRESULT to the DCOM application.

  • The OXID and the RPC bindings of the object exporter.

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

  • The COMVERSION of the server.

  • An authentication hint for use in subsequent ORPCs to the object.

  • An array of HRESULTS, one for each interface, that the client requested. If an element of this array is not S_OK, the client MUST consider that the object reference for the corresponding interface is not obtained.

  • An array of object references to the interfaces on the object.