Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The EnumComponents method retrieves an enumeration containing a collection of unordered network components of a particular type that are installed on the operating system.
Syntax
HRESULT EnumComponents(
[in] const GUID *pguidClass,
[out, optional] IEnumNetCfgComponent **ppenumComponent
);
Parameters
pguidClass [in]
Pointer to a GUID representing a specific class of network components. EnumComponents returns an enumeration containing this class of network components. Possible values are GUID_DEVCLASS_NET, GUID_DEVCLASS_NETTRANS, GUID_DEVCLASS_NETSERVICE, and GUID_DEVCLASS_NETCLIENT.Note NetClient components are deprecated in Windows 8.1, Windows Server 2012 R2, and later.
ppenumComponent [out, optional]
Pointer to a buffer that receives a pointer to the IEnumNetCfgComponent interface. This interface enumerates the INetCfgComponent interfaces for network components of a particular type that are installed on the operating system.
Return value
Returns zero (S_OK) if successful; otherwise, returns NETCFG_* codes that are defined in Netcfgx.h.
Remarks
The IEnumNetCfgComponent interface is a standard COM enumerator. To locate more information about COM enumerators and their methods, see the IEnum XXXX topic in the Microsoft Windows SDK.
Requirements
Target platform |
Desktop |
Header |
Netcfgx.h (include Netcfgx.h) |
See also