<div class="content" name="CopyConglomerations" uuid="5f50347d-9007-41bd-9974-804c1bf11878"><p>This method is called by a client to copy one or more <a href="3f01a312-3391-4109-a96e-95358babf191#gt_ea5c531f-5dd5-43aa-9da1-2ae068c622db" data-linktype="relative-path">conglomerations</a> from one <a href="3f01a312-3391-4109-a96e-95358babf191#gt_2f24f458-7d39-47a2-93f7-de433ea85c75" data-linktype="relative-path">partition</a> to another.</p><dl>
<dd>
<div><pre> HRESULT CopyConglomerations(
   [in, string] LPCWSTR pwszSourcePartition,
   [in, string] LPCWSTR pwszDestPartition,
   [in] DWORD cConglomerations,
   [in, string, size_is(cConglomerations,)] 
     LPCWSTR* ppwszConglomerationNamesOrIds
 );
</pre></div>
</dd></dl><p><b>pwszSourcePartition: </b>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 the <a href="3f01a312-3391-4109-a96e-95358babf191#gt_9587a9d3-3fd7-45c6-aab1-c74ff17a22b7" data-linktype="relative-path">partition
identifier</a> or the Name property of a partition, from which conglomerations
are to be copied.</p><p><b>pwszDestPartition: </b>Either the Curly Braced
GUID String Syntax ([MS-DTYP] section 2.3.4.3) representation of the partition
identifier or the Name property of a partition, to which conglomerations are to
be copied.</p><p><b>cConglomerations: </b>The number of elements in <i>ppwszConglomerationNamesOrIds</i>.</p><p><b>ppwszConglomerationNamesOrIds: </b>An array of
values, each of which is either the Curly Braced GUID String Syntax ([MS-DTYP]
section 2.3.4.3) representation of the <a href="3f01a312-3391-4109-a96e-95358babf191#gt_0ab5119e-c719-4a5c-9198-55a0a2fb508a" data-linktype="relative-path">conglomeration identifier</a>
or the Name property of a conglomeration to be copied.</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 source partition as follows:</p><ul><li><p><span><span> 
</span></span>If <i>pwszSourcePartition</i> is in Curly Braced GUID String
Syntax ([MS-DTYP] section 2.3.4.3), the server MUST select the partition with
partition identifier equal to the <a href="../ms-dtyp/4926e530-816e-41c2-b251-ec5c7aca018a" data-linktype="relative-path">GUID</a>
represented, and fail the call if no such partition exists.</p>
</li><li><p><span><span> 
</span></span>Otherwise, the server MUST select the partition with the Name
property equal to <i>pwszSourcePartition</i>, and fail the call if no such
partition exists.</p>
</li></ul><p>The server then MUST select the destination partition as
follows:</p><ul><li><p><span><span> 
</span></span>If <i>pwszDestPartition</i> is in Curly Braced GUID String Syntax
([MS-DTYP] section 2.3.4.3), the server MUST select the partition with the
partition identifier equal to the GUID represented, and fail the call if no
such partition exists.</p>
</li><li><p><span><span> 
</span></span>Otherwise, the server MUST select the partition with the Name
property equal to <i>pwszDestPartition</i>, and fail the call if no such
partition exists.</p>
</li></ul><p>For each element of <i>ppwszConglomerationNamesOrIds</i>,
the server then MUST select the conglomeration to copy as follows:</p><ul><li><p><span><span> 
</span></span>If the value of the element is in Curly Braced GUID String Syntax
([MS-DTYP] section 2.3.4.3), the server MUST select the conglomeration with the
conglomeration identifier equal to the GUID represented, and fail the call if
no such conglomeration exists.</p>
</li><li><p><span><span> 
</span></span>Otherwise, the server MUST select the conglomeration with the
Name property equal to the value of the element, and fail the call if no such
conglomeration exists.</p>
</li></ul><p>The server then MUST verify that the specified copy
operation is valid, as follows:</p><ul><li><p><span><span> 
</span></span>The server MUST verify that the destination partition is
changeable, in other words, the Changeable property is equal to TRUE
(0x00000001), and fail the call if not.</p>
</li><li><p><span><span> 
</span></span>For each conglomeration selected, the server MUST perform the
following:</p>
<ul><li><p><span><span>  </span></span>The
server MUST verify that the conglomeration is contained in the source
partition, and fail the call if not.</p>
</li><li><p><span><span>  </span></span>The
server MUST verify that the conglomeration does not contain any <a href="3f01a312-3391-4109-a96e-95358babf191#gt_13923d88-12fd-47b0-b406-ade71fa5963b" data-linktype="relative-path">component legacy configurations</a>,
and fail the call if not.</p>
</li><li><p><span><span>  </span></span>For
each <a href="3f01a312-3391-4109-a96e-95358babf191#gt_10747afc-d8b7-4515-b00f-a31037201a38" data-linktype="relative-path">component full
configuration</a> in the conglomeration, the server MUST verify that there does
not already exist in the destination partition a <a href="3f01a312-3391-4109-a96e-95358babf191#gt_31ed3bc7-a750-4fdd-a72d-d275caeab53e" data-linktype="relative-path">component configuration</a> for
the same <a href="3f01a312-3391-4109-a96e-95358babf191#gt_71669ed9-7eaf-4328-9e2e-4d3430f0f9bf" data-linktype="relative-path">component</a>, and
fail the call if not.</p>
</li></ul></li></ul><p>The remainder of the protocol behavior specified for this
method SHOULD be performed as an <a href="3f01a312-3391-4109-a96e-95358babf191#gt_6db11d6b-d493-46d4-ab87-2429ca8bcb1e" data-linktype="relative-path">atomic transaction</a>, in
other words, either the operation SHOULD fully succeed or the server SHOULD
make no changes to the catalog. This described behavior is provided to
facilitate the explanation of how the protocol behaves. This document does not
mandate that implementations adhere to this model as long as their external
behavior is consistent with that described in this document.</p><p>For each conglomeration, the server then MUST attempt to
perform a copy operation, as follows:</p><ul><li><p><span><span> 
</span></span>The server MUST attempt to generate a GUID, using the mechanism
specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>
section 3, to be the conglomeration identifier of the copy, and fail if it
cannot.</p>
</li><li><p><span><span> 
</span></span>The server then MUST attempt to create a new conglomeration in
the destination partition with the generated GUID as its conglomeration
identifier, and fail the call if it cannot.</p>
</li><li><p><span><span> 
</span></span>The server then MUST attempt to copy the properties, other than
PartitionIdentifier and ConglomerationIdentifier, of the conglomeration into
the copy, and fail the call if it cannot.</p>
</li><li><p><span><span> 
</span></span>For each component full configuration in the conglomeration, the
server then MUST attempt to create a new component full configuration in the
conglomeration copy, copying all properties other than PartitionIdentifier and
ConglomerationIdentifier from the original component full configuration, and
fail the call if it cannot.</p>
</li></ul></div>