<div class="content"><p> </p><p>The NetprPathType method checks a path name to determine its
type.</p><dl>
<dd>
<div><pre> NET_API_STATUS NetprPathType(
   [in, string, unique] SRVSVC_HANDLE ServerName,
   [in, string] WCHAR* PathName,
   [out] DWORD* PathType,
   [in] DWORD Flags
 );
</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>PathName: </b>A pointer to a null-terminated
UTF-16 string that specifies the path name to check.</p><p><b>PathType: </b>A path type is returned. It MUST be
one of the values that are defined in section <span><a href="03f17df3-ad31-4aed-a677-30261ac206a5" data-linktype="relative-path">2.2.2.9</a></span>.</p><p><b>Flags: </b>A bitmask that MUST contain the bitwise
OR of zero or more of the following values specifying controlling flags.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000001</p>
  </td>
  <td>
  <p>If set, the method uses old-style path rules (128-byte
  paths, 8.3 components) when validating the path. This flag is set on MS-DOS
  and OS/2 1.1 systems.</p>
  </td>
 </tr></tbody></table>
</dd></dl><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 NetprPathType message, the server MUST
parse the specified path, determining if it is a valid path and determining its
path type, or return an error code. Path type values are defined in section
2.2.2.9.</p><p>The <i>PathName</i> parameter specifies the path name whose
type needs to be determined. </p><p>If the <i>PathName</i> parameter is an empty string or has a
length greater than 260, the server MUST fail the call with ERROR_INVALID_NAME.
If the <i>Flag</i> parameter has a value other than 0 or 1, the server MUST
fail the call with ERROR_INVALID_PARAMETER.</p><p>If the <i>Flag</i> parameter is 0x1, the server MUST use old
(MS-DOS) style path name rules that state that a path name can be 128 bytes
long and that the file portion of the path has an 8-bit name and a 3-bit
extension. If the value of the <i>Flag</i> parameter is 0x0, the server MUST
use the long path name rules as specified in <span><a href="../ms-cifs/d416ff7c-c536-406e-a951-4f04b2fd1d2b" data-linktype="relative-path">[MS-CIFS]</a></span>
section <span><a href="../ms-cifs/09c2ccc8-4aaf-439f-9b4e-13b3fe85a4cf" data-linktype="relative-path">2.2.1.1.1</a></span>.</p><p>The server MUST obtain the path type value for the PathName
by using the algorithm as specified in section <span><a href="1b4ace6e-11f8-4ec9-9734-3439d66bc975" data-linktype="relative-path">3.1.1.9</a></span>. If the
algorithm yields ERROR_INVALID_NAME, the server MUST fail the call with the
same error code. Otherwise, the server MUST copy the path type value resulting
from the algorithm into PathType and return NERR_Success.</p><p>The server MAY<a id="Appendix_A_Target_108"></a><a aria-label="Product behavior note 108" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_108" data-linktype="relative-path">&lt;108&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_109"></a><a aria-label="Product behavior note 109" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_109" data-linktype="relative-path">&lt;109&gt;</a> fail the call.</p></div>