3.7.4.1.26 RpcWinStationGetLanAdapterName (Opnum 53)

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.<202><203>

 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
 );

hServer: Handle to the server object. This is of type SERVER_HANDLE. The hServer argument MUST be obtained from a previous call to RpcWinStationOpenServer.

pResult: If the call was successful, this parameter MUST be STATUS_SUCCESS (0x00000000); otherwise, it MUST be an implementation-specific negative value.

PdNameSize: The size, in bytes, of pPdName including the terminating NULL character.

pPdName: The transport protocol type on which to retrieve information. This MUST be any of the following strings: tcp, netbios, ipx, spx.

LanAdapter: The number of the LAN adapter to retrieve information (also known as lana). If this is set to "0", 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 pPdName.

pLength: The pointer to a ULONG containing the length of the string ppLanAdapter, in characters including the terminating NULL character. If LanAdapter is 0, this value MUST be DEVICENAME_LENGTH+1.

ppLanAdapter:  The pointer to a string allocated by this method for retrieving the LAN adapter's name. This memory MUST be freed by the caller.

Return Values:  Returns TRUE if the call is successful, and FALSE if the method fails. On failure, pResult indicates the failure status code.

Return value/code

Description

0x01

TRUE

Successful completion.

0x00

FALSE

Method call failed.