共用方式為


3.1.4.5.1 InitializeSession (Opnum 7)

This method is called by a client to perform Catalog Version Negotiation (section 3.1.4.1).

 HRESULT InitializeSession(
   [in] float flVerLower,
   [in] float flVerUpper,
   [in] long reserved,
   [out] float* pflVerSession
 );

flVerLower:  The lowest catalog version supported by the client.

flVerUpper:  The highest catalog version supported by the client.

reserved:  MUST be set to zero when sent and MUST be ignored on receipt.

pflVerSession: A pointer to a variable that, upon successful completion, MUST be set to the negotiated catalog version.

Return Values: This method MUST return S_OK (0x00000000) on success and a failure result, as specified in [MS-ERREF] section 2.1 on failure. All failure results MUST be treated identically.

Upon receiving a call to this method, the server MUST verify that flVerLower is less than or equal to flVerUpper, and fail the call if not.

The server then MUST calculate the negotiated catalog version as the highest catalog version number supported by both the client and the server, if such a catalog version exists, and store the value as part of the session state (see section 3.1.1.5). If there is no catalog version supported by both the client and the server, the server MUST fail the call.

The server then MUST set the value referenced by pflVerSession to the negotiated catalog version and return S_OK (0x00000000).