Поделиться через


CNetAddressCtrl::GetAddress

Retrieves a validated and parsed representation of the network address that is associated with the current network address control.

HRESULT GetAddress(
                PNC_ADDRESS pAddress 
  ) const;

Параметры

Parameter

Description

[in, out] pAddress

Pointer to an NC_ADDRESS structure. Set the pAddrInfo member of this structure to the address of a NET_ADDRESS_INFO structure before you call the GetAddress method.

Возвращаемое значение

The value S_OK if this method is successful; otherwise, a COM error code. For more information about the possible error codes, see the Return Value section of the NetAddr_GetAddress macro.

Требования

Header: afxcmn.h

This method is supported in Windows Vista and later.

Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.

Заметки

If this method is successful, the NET_ADDRESS_INFO structure contains additional information about the network address.

Use the CNetAddressCtrl::SetAllowType method to specify the types of addresses the current network address control can support. Use the CNetAddressCtrl::GetAddress method to validate and parse the network address that the user enters. Use the CNetAddressCtrl::DisplayErrorTip method to display an error message infotip if the CNetAddressCtrl::GetAddress method is unsuccessful.

This method invokes the NetAddr_GetAddress macro, which is described in the Windows SDK. That macro sends the NCM_GETADDRESS message.

См. также

Основные понятия

CNetAddressCtrl Class

CNetAddressCtrl Members

Hierarchy Chart

NetAddr_GetAddress Macro

CNetAddressCtrl::SetAllowType

CNetAddressCtrl::DisplayErrorTip

Error Handling (COM)