Share via


ICorDebugRemoteTarget::GetHostName Method

Returns the fully qualified domain name or IPv4 address of the remote debugging target machine. IPV6 is not supported at this time.

HRESULT GetHostName (
    [in] ULONG32      cchHostName,
    [out] ULONG32*    pcchHostName,
    [out, size_is(cchHostName), length_is(*pcchHostName)]
            WCHAR szHostName[]

Parameters

  • cchHostName
    [in] The size, in characters, of the szHostName buffer. If this parameter is 0 (zero), szHostName must be null.

  • pcchHostName
    [out] The number of characters, including a null terminator, in the host name or IP address. This parameter can be null.

  • szHostName
    [out] Buffer that contains the host name or IP address.

Return Value

  • S_OK
    The host name or IP address was successfully returned.

  • E_FAIL (or other E_ return codes)
    Unable to return the host name or IP address.

Remarks

This method is implemented by the debugger writer. It must follow the multiple call paradigm: On the first call, the caller passes null to both cchHostName and szHostName, and pcchHostName returns the size of the required buffer . On the second call, the size that was previously returned is passed in cchHostName, and an appropriately sized buffer is passed in szHostName.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorDebug.idl

Library: CorGuids.lib

.NET Framework Versions: 3.5 SP1

See Also

Reference

ICorDebugRemoteTarget Interface

ICorDebug Interface

Change History

Date

History

Reason

Added topic.

Information enhancement.