INetCfgComponent::GetDisplayName method

The GetDisplayName method retrieves the name of a network component that the network configuration subsystem displays in the property sheet dialog box for a network connection.

Syntax

HRESULT GetDisplayName(
  [out] LPWSTR *ppszwDisplayName
);

Parameters

  • ppszwDisplayName [out]
    Pointer to a buffer that receives a constant null-terminated string of 16-bit Unicode characters containing the display name of a network component.

Return value

Returns zero (S_OK) if successful; otherwise, returns NETCFG_* codes that are defined in Netcfgx.h. If the ppszwDisplayName parameter is NULL, GetDisplayName returns E_POINTER.

Remarks

After notify objects call GetDisplayName to retrieve the display name of a network component, GetDisplayName allocates the memory required to store the string containing the name. After notify objects finish with the name, they must call the COM CoTaskMemFree function to release the memory. For more information about CoTaskMemFree, see the Microsoft Windows SDK.

Names that the network configuration subsystem displays for network components include "TCP/IP Protocol" and "AppleTalk Protocol."

Requirements

Target platform

Desktop

Header

Netcfgx.h (include Netcfgx.h)

 

 

Send comments about this topic to Microsoft