<div class="content" name="DeleteAllData" uuid="10e460cd-04ea-48e8-88a9-fa512f1cdfa0"><p>The DeleteAllData method deletes all or a subset of local
data associated with a particular node.</p><dl>
<dd>
<div><pre> HRESULT DeleteAllData(
   [in] METADATA_HANDLE hMDHandle,
   [unique, in, string] LPCWSTR pszMDPath,
   [in] DWORD dwMDUserType,
   [in] DWORD dwMDDataType
 );
</pre></div>
</dd></dl><p><b>hMDHandle: </b>An unsigned 32-bit integer value
containing an open <a href="1243ba70-74ca-44f9-be0b-dfd6697010b4#gt_086b13f2-2715-4000-a16c-6acc3d59cc19" data-linktype="relative-path">metabase</a>
handle specifying the node in the metabase where the key data is to be deleted.</p><p><b>pszMDPath: </b>A pointer to a Unicode string that
contains the path of the node with which the data to be deleted is associated,
relative to the path of the <i>hMDHandle</i> parameter.</p><p><b>dwMDUserType: </b>An integer value specifying the
data to delete based on user type.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>ALL_METADATA 0x00000000</td>
  <td>Specifies all data, regardless of type.</td>
 </tr><tr>
  <td>ASP_MD_UT_APP 0x00000065</td>
  <td>Specifies data specific to ASP application configuration.</td>
 </tr><tr>
  <td>IIS_MD_UT_FILE 0x00000002</td>
  <td>Specifies data specific to a file, such as access permissions or logon methods.</td>
 </tr><tr>
  <td>IIS_MD_UT_SERVER 0x00000001</td>
  <td>Specifies data specific to the server, such as ports in use and IP addresses.</td>
 </tr><tr>
  <td>IIS_MD_UT_WAM 0x00000064</td>
  <td>Specifies data specific to WAM.</td>
 </tr></tbody></table>
</dd></dl><p><b>dwMDDataType: </b>An integer value specifying a
data type. If this parameter is not set to ALL_METADATA, the data item will be
removed only if its data type matches the specified type.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>ALL_METADATA 0x00000000</td>
  <td>Specifies all data, regardless of type.</td>
 </tr><tr>
  <td>BINARY_METADATA 0x00000003</td>
  <td>Specifies binary data in any form.</td>
 </tr><tr>
  <td>DWORD_METADATA 0x00000001</td>
  <td>Specifies all DWORD (unsigned 32-bit integer) data.</td>
 </tr><tr>
  <td>EXPANDSZ_METADATA 0x00000004</td>
  <td>Specifies all data consisting of a string that includes the terminating null character, which contains unexpanded environment variables.</td>
 </tr><tr>
  <td>MULTISZ_METADATA 0x00000005</td>
  <td>Specifies all data represented as an array of strings, where each string contains two occurrences of the terminating null character.</td>
 </tr><tr>
  <td>STRING_METADATA 0x00000002</td>
  <td>Specifies all data consisting of an ASCII string that includes the terminating null character.</td>
 </tr></tbody></table>
</dd></dl><p><b>Return Values: </b>A signed 32-bit value that
indicates return status. If the method returns a negative value, it failed. If
the 12-bit facility code (bits 16–27) is set to 0x007, the value contains a
Win32 error code in the lower 16 bits. Zero or positive values indicate
success, with the lower 16 bits in positive nonzero values containing warnings
or flags defined in the method implementation. For more information about Win32
error codes and <a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a>
values, see <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 S_OK</td>
  <td>The call was successful.</td>
 </tr><tr>
  <td>0x80070005 E_ACCESSDENIED</td>
  <td>General access denied error.</td>
 </tr><tr>
  <td>0x80070006 ERROR_INVALID_HANDLE</td>
  <td>The handle is invalid.</td>
 </tr></tbody></table>
</dd></dl><p>The <a href="1243ba70-74ca-44f9-be0b-dfd6697010b4#gt_e127848e-c66d-427d-b3aa-9f904fa4ada7" data-linktype="relative-path">opnum</a>
field value for this method is 14.</p><p>When processing this call, the server MUST do the following:</p><ul><li><p><span><span> 
</span></span>Check the handle. This handle is valid if it is either the master
root handle or a handle returned from a previous <a href="a54be1d0-009a-493d-a53e-e2f7fbe87293" data-linktype="relative-path">OpenKey</a> call. If the
handle is invalid, return ERROR_INVALID_HANDLE.</p>
</li><li><p><span><span> 
</span></span>The server SHOULD check whether the handle was opened for write
access. If not, return E_ACCESSDENIED.<a id="Appendix_A_Target_9"></a><a aria-label="Product behavior note 9" href="88fd1df0-e63e-41ca-9bf3-bedcab57cd86#Appendix_A_9" data-linktype="relative-path">&lt;9&gt;</a></p>
</li><li><p><span><span> 
</span></span>Check whether the relative path points to the existing subnode of
the parent handle. If not, return an error.</p>
</li><li><p><span><span> 
</span></span>For each data value that is defined on the destination node and
not inherited from the parent node, repeat the following:</p>
</li><li><p><span><span> 
</span></span>If the <i>dwMDUserType</i> and <i>dwMDDataType</i> parameters are
equal to &#34;ALL_METADATA&#34;, delete the data.</p>
</li><li><p><span><span> 
</span></span>If the user type parameter equals the user type of the data and
the data type parameter is equal to the data type of the data or ALL_METADATA,
delete this data value.</p>
</li><li><p><span><span> 
</span></span>If the data type parameter equals the data type of the data and
the user type parameter is equal to the user type of the data or ALL_METADATA,
the server SHOULD delete this data value.<a id="Appendix_A_Target_10"></a><a aria-label="Product behavior note 10" href="88fd1df0-e63e-41ca-9bf3-bedcab57cd86#Appendix_A_10" data-linktype="relative-path">&lt;10&gt;</a></p>
</li></ul></div>