IWSDiscoveredService::GetRemoteTransportAddress method (wsddisco.h)

Retrieves the string representation of the remote transport (IP) address.

Syntax

HRESULT GetRemoteTransportAddress(
  [out] LPCWSTR *ppszRemoteTransportAddress
);

Parameters

[out] ppszRemoteTransportAddress

String representation of the remote transport (IP) address. Is NULL if not available. Do not deallocate the output string.

Return value

This method can return one of these values.

Possible return values include, but are not limited to, the following.

Return code Description
S_OK
Method completed successfully.
E_POINTER
ppszRemoteTransportAddress is NULL.

Remarks

The resulting pointer value is only valid for the lifetime of the IWSDiscoveredService object.

The string returned by this method may contain an IPv4 or unbracketed IPv6 address such as "fe80::1". It may also contain a bracketed IPv6 address that includes the port such as "[fe80::1]:1234". The caller should parse the string carefully to account for both possibilities.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wsddisco.h (include Wsdapi.h)
DLL Wsdapi.dll

See also

IWSDiscoveredService