<div class="content" name="GetComponentVersions" uuid="fcf17b50-4a8b-46dd-aaa6-6c85053e9e08"><p>This method is called by a client to get a list of <a href="3f01a312-3391-4109-a96e-95358babf191#gt_10747afc-d8b7-4515-b00f-a31037201a38" data-linktype="relative-path">component full configurations</a>
for a <a href="3f01a312-3391-4109-a96e-95358babf191#gt_71669ed9-7eaf-4328-9e2e-4d3430f0f9bf" data-linktype="relative-path">component</a>.</p><dl>
<dd>
<div><pre> 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
 );
</pre></div>
</dd></dl><p><b>pwszClsidOrProgId: </b>A string containing either
the Curly Braced GUID String Syntax (<a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a>
section <a href="../ms-dtyp/222af2d3-5c00-4899-bc87-ed4c6515e80d" data-linktype="relative-path">2.3.4.3</a>)
representation of a <a href="3f01a312-3391-4109-a96e-95358babf191#gt_e433c806-6cb6-46a2-bb95-523df8818c99" data-linktype="relative-path">CLSID</a>
or the ProgID property of a component.</p><p><b>pdwVersions: </b>A pointer to a variable that, upon
successful completion, MUST be set to the number of component full
configurations that exist for the component.</p><p><b>ppPartitionIDs: </b>A pointer to a variable that,
upon successful completion, MUST be set to an array of <a href="3f01a312-3391-4109-a96e-95358babf191#gt_9587a9d3-3fd7-45c6-aab1-c74ff17a22b7" data-linktype="relative-path">partition identifiers</a> of
the <a href="3f01a312-3391-4109-a96e-95358babf191#gt_2f24f458-7d39-47a2-93f7-de433ea85c75" data-linktype="relative-path">partitions</a> in which
the component full configurations reside.</p><p><b>ppConglomerationIDs: </b>A pointer to a variable
that, upon successful completion, MUST be set to an array of <a href="3f01a312-3391-4109-a96e-95358babf191#gt_0ab5119e-c719-4a5c-9198-55a0a2fb508a" data-linktype="relative-path">conglomeration identifiers</a>
of the <a href="3f01a312-3391-4109-a96e-95358babf191#gt_ea5c531f-5dd5-43aa-9da1-2ae068c622db" data-linktype="relative-path">conglomerations</a>
containing the component full configurations, in the same order as <i>ppPartitionIDs</i>.</p><p><b>ppIsPrivate: </b>A pointer to a variable that,
upon successful completion, MUST be set to an array of the values of the
IsPrivate (see section <a href="62d84857-e39e-4879-a46d-8583e355521e" data-linktype="relative-path">3.1.1.3.1</a>)
property of the component full configurations, in the same order as <i>ppPartitionIDs</i>.</p><p><b>ppBitness: </b>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 <i>ppPartitionIDs</i>.</p><p><b>Return Values: </b>This method MUST return S_OK
(0x00000000) on success, and a failure result, as specified in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/0642cb2f-2075-4469-918c-4441e69c548a" data-linktype="relative-path">2.1</a>,
on failure. All failure results MUST be treated identically.</p><p>Upon receiving a call to this method, the server MUST verify
that <a href="3f01a312-3391-4109-a96e-95358babf191#gt_0944227d-0566-49e1-989f-2fff6e02542d" data-linktype="relative-path">catalog</a> version
negotiation has been performed by checking the negotiated catalog version (see
section <a href="a667265b-22a8-43bb-b462-13528061e009" data-linktype="relative-path">3.1.1.5</a>), and
fail the call if not.</p><p>The server then MUST select the component as follows:</p><ul><li><p><span><span> 
</span></span>If <i>pwszComponent</i> 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 <a href="3f01a312-3391-4109-a96e-95358babf191#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a>
represented, and fail the call if no such component exists.</p>
</li><li><p><span><span> 
</span></span>Otherwise, the server MUST select the component with ProgID
property equal to <i>pwszComponent</i>, and fail the call if no such component
exists.</p>
</li></ul><p>The server then MUST verify that the component has at least
one component full configuration, and fail the call if not.</p><p>The server then MUST attempt to set the values referenced by
the out parameters as follows:</p><ul><li><p><span><span> 
</span></span>The server MUST attempt to set the value referenced by <i>pdwVersions</i>
to the number of component full configurations that exist for the component,
and the values referenced by <i>ppPartitionIDs</i>, <i>ppConglomerationIDs</i>,
<i>ppIsPrivate</i>, and <i>ppBitness</i> 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.</p>
</li></ul></div>