Compartilhar via


3.2.4.1.2.1 Determining RPC Binding Information for OXID Resolution

The client MUST call the IObjectExporter::ServerAlive2 method as follows, unless the client COMVERSION is less than 5.6, in which case the client MUST call the IObjectExporter::ServerAlive method:

  • The client MUST specify the RPC protocol sequence corresponding to the wTowerId in the first STRINGBINDING of the saResAddr contained in the STDOBJREF of the object reference.

  • The client MUST specify the RPC endpoint information to contain the aNetworkAddr in the first STRINGBINDING of the saResAddr contained in the STDOBJREF of the object reference and the well-known endpoint of the object resolver.

  • The client MUST NOT specify security on the call.

If the IObjectExporter::ServerAlive2/IObjectExporter::ServerAlive call fails with the RPC_S_UNKNOWN_IF error (as specified in [MS-ERREF] section 2.2) indicating that the interface is not registered with the endpoint mapper:

  • The client MUST perform dynamic endpoint resolution as specified in [C706] section 2.2.3.

  • The client MUST call the IObjectExporter::ServerAlive2 and IObjectExporter::ServerAlive methods again.

If the client calls the IObjectExporter::ServerAlive2 method, and if the call fails with the RPC_S_PROCNUM_OUT_OF_RANGE error (as specified in [MS-ERREF] section 2.2) indicating that the opnum is not in range:

  • The client MUST pick the RPC binding information used for the current IObjectExporter::ServerAlive2 call to be used for the OXID resolution request.

  • The client SHOULD proceed to issue the OXID resolution as specified in section 3.2.4.1.2.2.

Otherwise, if the call fails with any other RPC error:

  • The client MUST specify the RPC protocol sequence corresponding to the wTowerId in the next STRINGBINDING of the saResAddr contained in the STDOBJREF of the object reference.

  • The client MUST specify the RPC endpoint information to contain the aNetworkAddr in the next STRINGBINDING of the saResAddr contained in the STDOBJREF of the object reference and the well-known endpoint of the object resolver.

  • The client MUST make the IObjectExporter::ServerAlive2/IObjectExporter::ServerAlive call again, and MUST treat RPC_S_UNKNOWN_IF and RPC_S_PROCNUM_OUT_OF_RANGE errors as specified previously.

Otherwise, if the call succeeds:

  • The client MUST pick the RPC binding information used for the current IObjectExporter::ServerAlive2 call to be used for the OXID resolution request.

  • The client SHOULD proceed to issue the OXID resolution, as specified in section 3.2.4.1.2.2.

If the client cannot determine the RPC binding information to be used for OXID resolution after using all the RPC protocol sequences available in the STRINGBINDING structure contained in the saResAddr field, the client MUST fail the unmarshaling of the object reference and SHOULD return OR_INVALID_OXID (as specified in [MS-ERREF] section 2.2) to the DCOM application.