<div class="content" name="RpcWinStationGetLanAdapterName" uuid="f3450fdd-d5b5-4a31-9089-3f60b6d82306"><p>The RpcWinStationGetLanAdapterName method returns the name
of the LAN adapter with a specific LAN adapter number (lana) and transport
type, if it is configured to be used for a Terminal Services protocol
connection. No special permissions are required to call this method.<a id="Appendix_A_Target_204"></a><a aria-label="Product behavior note 204" href="7ce7f717-461b-4f18-9829-6690168c7707#Appendix_A_204" data-linktype="relative-path">&lt;204&gt;</a><a id="Appendix_A_Target_205"></a><a aria-label="Product behavior note 205" href="7ce7f717-461b-4f18-9829-6690168c7707#Appendix_A_205" data-linktype="relative-path">&lt;205&gt;</a></p><dl>
<dd>
<div><pre> BOOLEAN RpcWinStationGetLanAdapterName(
   [in] SERVER_HANDLE hServer,
   [out] DWORD* pResult,
   [in, range(0, 0x1000)] DWORD PdNameSize,
   [in, size_is(PdNameSize)] PWCHAR pPdName,
   [in, range(0, 1024)] ULONG LanAdapter,
   [out] ULONG* pLength,
   [out, size_is(,*pLength)] PWCHAR* ppLanAdapter
 );
</pre></div>
</dd></dl><p><b>hServer: </b>Handle to the server object. This is
of type <span><a href="49484cdf-2feb-4de9-a588-5d01cf8995dc" data-linktype="relative-path">SERVER_HANDLE</a></span>. The <i>hServer</i>
argument MUST be obtained from a previous call to <span><a href="fd6f339d-f5dd-452c-a9a9-ec753c22a36a" data-linktype="relative-path">RpcWinStationOpenServer</a></span>.</p><p><b>pResult: </b>If the call was successful, this
parameter MUST be STATUS_SUCCESS (0x00000000); otherwise, it MUST be an
implementation-specific negative value.</p><p><b>PdNameSize: </b>The size, in bytes, of <i>pPdName</i>
including the terminating NULL character.</p><p><b>pPdName: </b>The transport protocol type on which
to retrieve information. This MUST be any of the following strings: tcp,
netbios, ipx, spx.</p><p><b>LanAdapter: </b>The number of the LAN adapter to
retrieve information (also known as lana). If this is set to &#34;0&#34;, it
will always return a LAN adapter name to indicate all LAN adapters configured
with the protocol, irrespective of the transport protocol type specified in <i>pPdName</i>.</p><p><b>pLength: </b>The pointer to a <span><a href="../ms-dtyp/32862b84-f6e6-40f9-85ca-c4faf985b822" data-linktype="relative-path">ULONG</a></span>
containing the length of the string <i>ppLanAdapter</i>, in characters
including the terminating NULL character. If <i>LanAdapter</i> is 0, this value
MUST be DEVICENAME_LENGTH+1.</p><p><b>ppLanAdapter: </b> The pointer to a string
allocated by this method for retrieving the LAN adapter&#39;s name. This memory
MUST be freed by the caller.</p><p><b>Return Values: </b> Returns TRUE if the call is
successful, and FALSE if the method fails. On failure, pResult indicates the
failure status code.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x01 TRUE</td>
  <td>Successful completion.</td>
 </tr><tr>
  <td>0x00 FALSE</td>
  <td>Method call failed.</td>
 </tr></tbody></table>
</dd></dl><p> </p></div>