<div class="content"><p>The ChangeDiffAreaMaximumSize method changes the maximum
size of a <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_34a368ce-08be-44b8-8d15-cfa0d4ac176e" data-linktype="relative-path">shadow copy
storage association</a> on the server.</p><dl>
<dd>
<div><pre> HRESULT ChangeDiffAreaMaximumSize(
   [in] VSS_PWSZ pwszVolumeName,
   [in] VSS_PWSZ pwszDiffAreaVolumeName,
   [in] LONGLONG llMaximumDiffSpace
 );
</pre></div>
</dd></dl><p><b>pwszVolumeName: </b>A null-terminated <a href="../ms-dtyp/845b6fa4-c34a-4b90-824d-60e98533dfb5" data-linktype="relative-path">UNICODE</a>
string that contains the <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_1b153cd0-e3f3-4383-bc66-d5ad482c9766" data-linktype="relative-path">drive
letter</a>, <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_513fcb37-059f-475c-a13d-e89b302f8ae8" data-linktype="relative-path">mount point</a>,
or <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_ae3b4c60-05dc-4011-bd62-753ef23bb3cd" data-linktype="relative-path">volume mount name</a> of
the <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_9a876829-33a1-4f0b-8b81-8552b7e5561c" data-linktype="relative-path">volume</a> for which the
<a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_34537940-5a56-4122-b6ff-b9a4d065d066" data-linktype="relative-path">shadow copy</a> is made.
This is the <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_57484dae-5eef-4485-bfe4-db22b9cd90d6" data-linktype="relative-path">original volume</a>.</p><p><b>pwszDiffAreaVolumeName: </b>A null-terminated
UNICODE string that contains the drive letter, mount point, or volume mount
name of the volume on which the <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_d85fc09f-c375-4e90-952d-7c95a8e244dd" data-linktype="relative-path">shadow copy storage</a> is
located for the volume specified in <i>pwszVolumeName</i>. This is the <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_9abab753-55aa-4455-bb21-7b51a32654fa" data-linktype="relative-path">shadow copy storage volume</a>.</p><p><b>llMaximumDiffSpace: </b>The maximum number of <a href="../ms-dtyp/d7edc080-e499-4219-a837-1bc40b64bb04" data-linktype="relative-path">BYTEs</a>
that the shadow copy storage will occupy. The server MAY automatically delete
shadow copies based on an implementation-specific algorithm that reclaims space
for newer shadow copies. </p><p><b>Return Values: </b>The method MUST return the
following error code for the specific conditions.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x80042308</p>
  <p>VSS_E_OBJECT_NOT_FOUND</p>
  </td>
  <td>
  <p>The object does not exist on the server.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>E_INVALIDARG</p>
  </td>
  <td>
  <p>Returned when <i>pwszVolumeName</i> or <i>pwszDiffAreaVolume</i>
  is NULL.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x8004231d</p>
  <p>VSS_E_VOLUME_IN_USE</p>
  </td>
  <td>
  <p>Returned when <i>llMaximumDiffSpace</i> is zero, and
  the diff area cannot be deleted because shadow copies are still being stored.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x8004231f</p>
  <p>VSS_E_INSUFFICIENT_STORAGE</p>
  </td>
  <td>
  <p>Returned if a nonzero size is specified in <i>llMaximumDiffSpace</i>
  that is smaller than the size required for storing a single shadow copy.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070005</p>
  <p>E_ACCESSDENIED</p>
  </td>
  <td>
  <p>Returned when the user making the request does not
  have sufficient privileges to perform the operation.</p>
  </td>
 </tr></tbody></table>
</dd>
<dd>
<p>For any other conditions the method MUST return zero
when it has succeeded or an implementation-specific nonzero error code on
failure.</p>
</dd></dl><p>No exceptions are thrown except those that are thrown by the
underlying <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> protocol <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>.</p><p>When the server receives this message, it MUST validate the
following parameters:</p><ul><li><p><span><span> 
</span></span>The <i>pwszVolumeName</i> parameter is not NULL.</p>
</li><li><p><span><span> 
</span></span>The <i>pwszDiffAreaVolumeNAme</i> parameter is not NULL.</p>
</li></ul><p>The server MUST locate the shadow copy storage association
that is specified by the <i>pwszVolumeName</i> and <i>pwszDiffAreaVolumeName</i>
parameters, modify the maximum size property to match the specified value, and
persist this change on the server. If the server receives the value of zero for
the <i>llMaximumDiffSpace</i> parameter, the server MUST interpret this as a
request to delete the shadow copy storage association. If the shadow copy
storage association is actively in use to store shadow copies, the server MUST
fail the deletion request by using an implementation-specific nonzero error
code or an error code from the previous table. If the shadow copy storage
association cannot be found, the server MUST fail with an
implementation-specific nonzero error code or an error code from the previous
table.</p></div>