次の方法で共有


3.5.4.3.9 DsrAddressToSiteNamesExW (Opnum 37)

The DsrAddressToSiteNamesExW method SHOULD<169> translate a list of socket addresses into their corresponding site names and subnet names. For details about the mapping from socket address to subnet/site name, see [MS-ADTS] sections 6.1.1.2.2.1 and 6.1.1.2.2.2.

 NET_API_STATUS DsrAddressToSiteNamesExW(
   [in, unique, string] LOGONSRV_HANDLE ComputerName,
   [in, range(0, 32000)] DWORD EntryCount,
   [in, size_is(EntryCount)] PNL_SOCKET_ADDRESS SocketAddresses,
   [out] PNL_SITE_NAME_EX_ARRAY* SiteNames
 );

ComputerName: The custom binding handle (defined in section 3.5.4.1) that represents the connection to a domain controller.

EntryCount: The number of socket addresses specified in SocketAddresses. The maximum value for EntryCount is 32000. To avoid large memory allocations, this number was chosen as a reasonable limit for the maximum number of socket addresses that this method accepts.

SocketAddresses: An array of NL_SOCKET_ADDRESS structures (section 2.2.1.2.4) that contains socket addresses to translate. The number of addresses specified MUST be equal to EntryCount.

SiteNames: A pointer to an NL_SITE_NAME_EX_ARRAY structure (section 2.2.1.2.3) that contains an array of site names and an array of subnet names that correspond to socket addresses in SocketAddresses. The number of entries returned is equal to EntryCount. The fields of an entry are set to zero if the corresponding socket address does not map to any site, or if the address family of the socket address is not IPV4 or IPV6. The mapping of IP addresses to sites is specified in [MS-ADTS] section 6.1.1.2.2.1.

Return Values: The method returns 0x00000000 on success; otherwise, it SHOULD return one of the following error codes.

Return Value/Code

Description

0x00000008

ERROR_NOT_ENOUGH_MEMORY

Not enough storage is available to process this command.

0x00000057

ERROR_INVALID_PARAMETER

One of the parameters is invalid. This error value is returned if the value of EntryCount passed to DsrAddressToSiteNamesExW is zero.

This method returns errors based on Common Error Processing Rule A, specified in section 3.

The server MUST return the site and subnet names that correspond to the SocketAddresses by using the method specified for IP address and site/subnet mapping ([MS-ADTS] section 6.1.1.2.2.2.1).