<div class="content"><p>The AddDiffArea method creates a <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_34a368ce-08be-44b8-8d15-cfa0d4ac176e" data-linktype="relative-path">shadow copy storage association</a>
for a <a href="726a3dc9-844e-44c8-9527-236c3bd52dff#gt_34537940-5a56-4122-b6ff-b9a4d065d066" data-linktype="relative-path">shadow copy</a>.</p><dl>
<dd>
<div><pre> HRESULT AddDiffArea(
   [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
shadow copy 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 that is 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>0x8004230d  </p>
  <p>VSS_E_OBJECT_ALREADY_EXISTS</p>
  </td>
  <td>
  <p>The object already exists on the server.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>E_INVALIDARG</p>
  </td>
  <td>
  <p>R returned when <i>pwszVolumeName</i> or <i>pwszDiffAreaVolumeName</i>
  is NULL, or if <i>llMaximumDiffSpace</i> is 0.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x8004230c</p>
  <p>VSS_E_VOLUME_NOT_SUPPORTED</p>
  </td>
  <td>
  <p>Returned when the <i>pwszVolumeName</i> does not
  support shadow copies, or <i>pwszDiffAreaVolumeName</i> does not support
  shadow copy storage.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x8004231e</p>
  <p>VSS_E_MAXIMUM_DIFF-AREA_ASSOCIATIONS_REACHED</p>
  </td>
  <td>
  <p>Returned when the maximum number of diff area
  associations for <i>pwszVolumeName</i> has been reached.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80042306</p>
  <p>VSS_E_PROVIDER_VETO</p>
  </td>
  <td>
  <p>Returned when the snapshot provider receives an
  expected error and tries to veto the impending operation.</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
specified in <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 volume that is contained in the <i>pwszVolumeName</i>
parameter supports shadow copies.</p>
</li><li><p><span><span> 
</span></span>The <i>pwszDiffAreaVolumeName</i> parameter is not NULL.</p>
</li><li><p><span><span> 
</span></span>The volume that is contained in the <i>pwszDiffAreaVolumeName</i>
parameter supports shadow copy storage.</p>
</li><li><p><span><span> 
</span></span>The <i>llMaximumDiffSpace</i> parameter is greater than zero.</p>
</li></ul><p>The server MUST create a new shadow copy storage association
that has the specified maximum size property in the server abstract model or
return an implementation-specific nonzero error code or an error code from the
preceding table.</p></div>