INetCfg::QueryNetCfgClass method

The QueryNetCfgClass method retrieves a pointer to a network configuration interface that represents a specific class of network component.

Syntax

HRESULT QueryNetCfgClass(
  [in]            const GUID   *pguidClass,
  [in]                  REFIID riid,
  [out, optional]       void   **ppvObject
);

Parameters

  • pguidClass [in]
    Pointer to a GUID representing a specific 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.

     

  • riid [in]
    Specifies a reference pointer to the identifier of the interface being requested.

  • ppvObject [out, optional]
    Pointer to a buffer that receives the interface pointer requested in the riid parameter. Upon successful return, * ppvObject contains the requested interface pointer to the class of components represented by the pguidClass parameter.

Return value

Returns zero (S_OK) if successful; otherwise, returns NETCFG_* codes that are defined in Netcfgx.h.

Remarks

Notify objects can call QueryNetCfgClass to query for any INetCfgClass interface that implements a specific class of network component. Notify objects can then call the INetCfgClass::EnumComponents method to obtain the collection of network components that currently belong to the class. In this way, notify objects can obtain the running state of changed components belonging to the class.

Requirements

Target platform

Desktop

Header

Netcfgx.h (include Netcfgx.h)

See also

INetCfgClass

INetCfgClass::EnumComponents

 

 

Send comments about this topic to Microsoft