3.1.4.18.9 GetComponentVersions (Opnum 11)
This method is called by a client to get a list of component full configurations for a component.
-
HRESULT GetComponentVersions( [in] LPCWSTR pwszClsidOrProgId, [out] DWORD* pdwVersions, [out, size_is(, *pdwVersions)] GUID** ppPartitionIDs, [out, size_is(, *pdwVersions)] GUID** ppConglomerationIDs, [out, size_is(, *pdwVersions)] BOOL** ppIsPrivate, [out, size_is(, *pdwVersions)] LONG** ppBitness );
pwszClsidOrProgId: A string containing either the Curly Braced GUID String Syntax ([MS-DTYP] section 2.3.4.3) representation of a CLSID or the ProgID property of a component.
pdwVersions: A pointer to a variable that, upon successful completion, MUST be set to the number of component full configurations that exist for the component.
ppPartitionIDs: A pointer to a variable that, upon successful completion, MUST be set to an array of partition identifiers of the partitions in which the component full configurations reside.
ppConglomerationIDs: A pointer to a variable that, upon successful completion, MUST be set to an array of conglomeration identifiers of the conglomerations containing the component full configurations, in the same order as ppPartitionIDs.
ppIsPrivate: A pointer to a variable that, upon successful completion, MUST be set to an array of the values of the IsPrivate (see section 3.1.1.3.1) property of the component full configurations, in the same order as ppPartitionIDs.
ppBitness: A pointer to a variable that, upon successful completion, MUST be set to an array of the values of the ConfigurationBitness (see section 3.1.1.3.1) property of the component full configurations, in the same order as ppPartitionIDs.
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 catalog version negotiation has been performed by checking the negotiated catalog version (see section 3.1.1.5), and fail the call if not.
The server then MUST select the component as follows:
If pwszComponent is in Curly Braced GUID String Syntax ([MS-DTYP] section 2.3.4.3), the server MUST select the component with CLSID equal to the GUID represented, and fail the call if no such component exists.
Otherwise, the server MUST select the component with ProgID property equal to pwszComponent, and fail the call if no such component exists.
The server then MUST verify that the component has at least one component full configuration, and fail the call if not.
The server then MUST attempt to set the values referenced by the out parameters as follows:
The server MUST attempt to set the value referenced by pdwVersions to the number of component full configurations that exist for the component, and the values referenced by ppPartitionIDs, ppConglomerationIDs, ppIsPrivate, and ppBitness to arrays of the values of the PartitionIdentifier, ConglomerationIdentifier, IsPrivate, and ConfigurationBitness properties, respectively, of the component full configurations, and fail the call if it cannot.