SspiGetTargetHostName function (sspi.h)

Gets the host name associated with the specified target.

Syntax

SECURITY_STATUS SEC_ENTRY SspiGetTargetHostName(
  [in]  PCWSTR pszTargetName,
  [out] PWSTR  *pszHostName
);

Parameters

[in] pszTargetName

The target for which to get the host name.

[out] pszHostName

The name of the host associated with the target specified by the pszTargetName parameter.

Return value

If the function succeeds, it returns SEC_E_OK.

If the function fails, it returns a nonzero error code.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header sspi.h
Library Secur32.lib
DLL SspiCli.dll