Share via


INetCfgComponent::GetDeviceStatus method

The GetDeviceStatus method retrieves the status of a network card.

Syntax

HRESULT GetDeviceStatus(
  [out] ULONG *pStatus
);

Parameters

  • pStatus [out]
    Pointer to a 32-bit variable that receives the status of a network card.

Return value

Returns zero (S_OK) if successful, and returns E_UNEXPECTED if the component is not a network card (that is, if the component is not a member of network class GUID_DEVCLASS_NET).

Note   The GetDeviceStatus method can also return other NETCFG_ Xxx codes that are defined in Netcfgx.h.

 

Remarks

The GetDeviceStatus method retrieves the status of a network card, from the configuration manager, for Plug and Play. The status, pointed to by the pStatus parameter, is one of the CR_-prefixed error codes defined in Cfgmgr32.h.

GetDeviceStatus is only valid for components that are members of network class GUID_DEVCLASS_NET. GetDeviceStatus returns E_UNEXPECTED if called for components of other types and can include:

  • Transports represented by GUID_DEVCLASS_NETTRANS

  • Network services represented by GUID_DEVCLASS_NETSERVICE

  • Network clients represented by GUID_DEVCLASS_NETCLIENT

Requirements

Target platform

Desktop

Header

Netcfgx.h (include Netcfgx.h)

 

 

Send comments about this topic to Microsoft