4.1 Catalog Session and Capabilities Initialization
Figure 6: Session and capabilities negotiation
The preceding figure shows the sequence for a COMA client (that supports catalog versions 3.00 to 5.00) initializing a session with the COMA server (that supports catalog version 5.00) and determining its capabilities, on behalf of a client application that requested the COMA client to establish a session with the COMA server.
The COMA client starts by performing DCOM activation for the COMA server object on the server by using the CLSID CLSID_COMAServer.
The COMA client calls ICatalogSession::InitializeSession (section 3.1.4.5.1) method on the COMA server DCOM object.
HRESULT ICatalogSession::InitializeSession( [in] float flVerLower = 3.0, [in] float flVerUpper = 5.0, [in] long reserved = 0x00000000, [out] float* pflVerSession = {pointer to uninitialized memory});
The server checks to see if it supports any version in the range 3.0 and 5.0. In this case, it does support version 5.0; thus, it sets the pflVerSession parameter to 5.0 and returns S_OK.
HRESULT = S_OK ICatalogSession::InitializeSession( [in] float flVerLower = {unchanged}, [in] float flVerUpper = {unchanged}, [in] long reserved = {unchanged}, [out] float* pflVerSession = 5.0);
The COMA client stores the version number of the server and ensures that for further communication with the server it will use the schema for catalog version 5.00.
The COMA client then tries to determine the capabilities of the server by calling the ICatalogSession::GetServerInformation (section 3.1.4.5.2) method on the COMA server DCOM object.
HRESULT ICatalogSession::GetServerInformation( [out] long * plReserved1 = NULL, [out] long * plReserved1 = NULL, [out] long * plReserved1 = NULL, [out] long * plMultiplePartitionSupport = {pointer to uninitialized memory}, [out] long * plReserved1 = NULL, [out] long * plReserved1 = NULL);
The COMA server determines if it supports multiple partitions. In this case, it does, so it sets plMultiplePartitionSupport = 0x00000002 and returns S_OK.
HRESULT = S_OK ICatalogSession::GetServerInformation( [out] long * plReserved1 = {unchanged}, [out] long * plReserved1 = {unchanged}, [out] long * plReserved1 = {unchanged}, [out] long * plMultiplePartitionSupport = 0x00000002, [out] long * plReserved1 = {unchanged}, [out] long * plReserved1 = {unchanged});
The COMA client now checks to see if the COMA server supports non-native bitness. It does so by calling the ICatalog64BitSupport::SupportsMultipleBitness method on the COMA server DCOM object.
ICatalog64BitSupport::SupportsMultipleBitness( [out] int * pbSupportsMultipleBitness = {pointer to uninitialized memory for the returned bitness value});
The COMA server determines whether it supports non-native bitness. In this case, it does not, so it sets pbSupportsMultipleBitness to 0x00000000 and returns S_OK.
HRESULT = S_OK ICatalog64BitSupport::SupportsMultipleBitness( [out] int * pbSupportsMultipleBitness = 0x00000000);
The COMA client remembers that the server does not support multiple bitnesses.