Compartilhar via


INetCfgComponent::GetId method

The GetId method retrieves the identifier of a network component.

Syntax

HRESULT GetId(
  [out] LPWSTR *ppszwId
);

Parameters

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

Return value

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

Remarks

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

The GetId method locates a component identifier in the component's INF file. Component identifiers include MS_TCPIP and NDISWAN.

Requirements

Target platform

Desktop

Header

Netcfgx.h (include Netcfgx.h)

 

 

Send comments about this topic to Microsoft