<div class="content"><p> </p><p>The NetrDfsSetLocalVolumeState method sets a local <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_0b8086c9-d025-45b8-bf09-6b5eca72713e" data-linktype="relative-path">DFS</a></span>
share online or offline. An implementation MAY<a id="Appendix_A_Target_142"></a><a aria-label="Product behavior note 142" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_142" data-linktype="relative-path">&lt;142&gt;</a> choose
to support this method.</p><dl>
<dd>
<div><pre> NET_API_STATUS NetrDfsSetLocalVolumeState(
   [in, string, unique] SRVSVC_HANDLE ServerName,
   [in] GUID* Uid,
   [in, string] WCHAR* Prefix,
   [in] unsigned long State
 );
</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 (see <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). The server MUST ignore this parameter.</p><p><b>Uid: </b>Specifies the <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a></span> of the DFS
share. This GUID MUST be obtained by using the NetrDfsGetInfo (Opnum 4) method,
as specified in <span><a href="../ms-dfsnm/95a506a8-cae6-4c42-b19d-9c1ed1223979" data-linktype="relative-path">[MS-DFSNM]</a></span>
section <span><a href="../ms-dfsnm/b5dd4568-3ea4-4f27-ae03-3ebb19fa4b13" data-linktype="relative-path">3.1.4.1.6</a></span>.</p><p><b>Prefix: </b>A pointer to a null-terminated UTF-16
string that specifies the path to the DFS share.</p><p><b>State: </b>A DWORD that specifies the new state
for the DFS share. To set the share to offline, the <i>State</i> parameter MUST
be (0x80). The <i>State</i> parameter MUST be set to any other value to take
the share online.</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>In response to a NetrDfsSetLocalVolumeState message, the
server SHOULD<a id="Appendix_A_Target_143"></a><a aria-label="Product behavior note 143" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_143" data-linktype="relative-path">&lt;143&gt;</a> choose to perform no
processing and return an implementation-specific error code when this method is
called. If the server supports DFS, the server MAY set the state of a local DFS
share to online or offline. Marking a share state offline makes the share
inaccessible over DFS.</p><p>The <i>Uid</i> parameter specifies the GUID of the share
whose state needs to be set.</p><p>The <i>Prefix</i> parameter specifies the path of the DFS
share whose state needs to be set. This parameter MUST refer to a local DFS
share. If the server does not find a DFS share whose path starts with the value
of the <i>Prefix</i> parameter and whose GUID matches the value of the <i>Uid</i>
parameter, the server MUST fail the call and return an implementation-specific
error code.</p><p>The <i>State</i> parameter specifies whether the share state
MUST be set to online or offline. If the value of <i>State</i> is 0x80, the
share state MUST be set to offline. For any other value, the share state MUST
be set to online.</p><p>The server MAY<a id="Appendix_A_Target_144"></a><a aria-label="Product behavior note 144" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_144" data-linktype="relative-path">&lt;144&gt;</a>
enforce security measures to verify that the caller has the required
permissions to execute this call. If the server enforces these security
measures and the caller does not have the required credentials, the server
SHOULD<a id="Appendix_A_Target_145"></a><a aria-label="Product behavior note 145" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_145" data-linktype="relative-path">&lt;145&gt;</a> fail the call.</p></div>