<div class="content"><p> </p><p>The NetrShareDelSticky method marks the share as
nonpersistent by clearing the <b>IsPersistent</b> member of a Share in the <b>ShareList</b>.
</p><dl>
<dd>
<div><pre> NET_API_STATUS NetrShareDelSticky(
   [in, string, unique] SRVSVC_HANDLE ServerName,
   [in, string] WCHAR* NetName,
   [in] DWORD Reserved
 );
</pre></div>
</dd></dl><p><b>ServerName: </b>An <span><a href="5f8329ee-1965-4ea1-ad35-3b29fbb63232" data-linktype="relative-path">SRVSVC_HANDLE (section 2.2.1.1)</a></span>
pointer that identifies the <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_434b0234-e970-4e8c-bdfa-e16a30d96703" data-linktype="relative-path">server</a></span>. The <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_60e0e1fa-66fe-41e1-b5e3-ceab97e53506" data-linktype="relative-path">client</a></span>
MUST map this structure to an RPC binding handle (<span><a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a></span> sections
4.3.5 and 5.1.5.2). If this parameter is NULL, the local computer is used.</p><p><b>NetName: </b>A pointer to a null-terminated UTF-16
string that specifies the name of the share to delete.</p><p><b>Reserved: </b>The server MUST ignore this
parameter.<a id="Appendix_A_Target_71"></a><a aria-label="Product behavior note 71" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_71" data-linktype="relative-path">&lt;71&gt;</a></p><p><b>Return Values: </b>The method returns 0x00000000
(NERR_Success) to indicate success; otherwise, it returns a nonzero error code.
The method can take any specific error code value, as specified in <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>
section <span><a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a></span>.
</p><p>The primary use of this method is to delete a sticky share
whose root directory has been deleted (thus preventing actual re-creation of
the share) but whose entry still exists in permanent storage.<a id="Appendix_A_Target_72"></a><a aria-label="Product behavior note 72" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_72" data-linktype="relative-path">&lt;72&gt;</a> This method can also be used to
remove the persistence of a share without deleting the current incarnation of
the share.</p><p>If <i>ServerName</i> does not match any <b>Transport.ServerName</b>
in <b>TransportList</b> with the SVTI2_SCOPED_NAME bit set in <b>Transport.Flags</b>,
the server MUST reset <i>ServerName</i> as &#34;*&#34;.</p><p>The server MUST remove any preceding &#34;\\&#34; from the
<i>ServerName</i> parameter and normalize the <i>ServerName</i> parameter as
specified in section <span><a href="281119a2-9545-4d8d-b186-6e85b412f4ff" data-linktype="relative-path">3.1.6.8</a></span>, passing in
the updated <i>ServerName</i> parameter as the ServerName, and an empty string
as the ShareName.</p><p>The <i>NetName</i> parameter specifies the name of the share
to delete. This MUST be a nonempty, null-terminated UTF-16 string; otherwise,
the server MUST fail the call with an ERROR_INVALID_PARAMETER error code.</p><p>The server MUST search through <b>ShareList</b> and locate a
<b>Share</b> where <b>Share.ShareName</b> matches <i>NetName</i>, <b>Share.ServerName</b>
matches <i>ServerName</i>, and  <b>Share.IsPersistent</b> is TRUE. If a match
is not found, the server MUST fail the call with an NERR_NetNameNotFound error
code.</p><p>If a match is found, the server MUST make the share
nonpersistent by setting <b>Share.IsPersistent</b> to FALSE and the server MUST
delete the share entry from permanent storage.</p><p>The server SHOULD<a id="Appendix_A_Target_73"></a><a aria-label="Product behavior note 73" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_73" data-linktype="relative-path">&lt;73&gt;</a> enforce
security measures to verify that the caller has the required permissions to
execute this routine. If the caller does not have the required credentials, the
server SHOULD<a id="Appendix_A_Target_74"></a><a aria-label="Product behavior note 74" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_74" data-linktype="relative-path">&lt;74&gt;</a> fail the call.</p></div>