Share via


INetCfgClassSetup::DeInstall method

The DeInstall method removes the specified network component from the operating system.

Syntax

HRESULT DeInstall(
  [in]            INetCfgComponent *pComponent,
  [in, optional]  OBO_TOKEN        *pOboToken,
  [out, optional] LPWSTR           *pmszwRefs
);

Parameters

  • pComponent [in]
    Pointer to the INetCfgComponent interface of the network component to remove.

  • pOboToken [in, optional]
    Pointer to an OBO_TOKEN structure describing an entity that requires the removal of the specified network component. If the component to remove is of the class GUID_DEVCLASS_NET, this parameter is optional and set to a NULL value. Otherwise, this parameter is mandatory. After a notify object passes this parameter, DeInstall decrements the component's reference count on behalf of this token. If the component's reference count on behalf of all tokens becomes zero, the network configuration subsystem removes the component.

  • pmszwRefs [out, optional]
    Pointer to a buffer that receives a constant null-terminated string of 16-bit Unicode characters containing the component's modified reference count.

Return value

Returns zero (S_OK) if successful; otherwise, returns one of the following codes:

Return code Description
NETCFG_S_REBOOT

A system reboot is required after Deinstall removes the component.

NETCFG_S_STILL_REFERENCED

The component is still required by other components and cannot be removed until those components are removed.

NETCFG_E_NEED_REBOOT

A system reboot is required before the component can be removed.

 

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

 

Remarks

Before removing the specified network component, DeInstall first unbinds any other network components bound to the specified component.

A notify object can call DeInstall from one of its following methods:

Requirements

Target platform

Desktop

Header

Netcfgx.h (include Netcfgx.h)

See also

INetCfgComponent

INetCfgComponentNotifyBinding

INetCfgComponentNotifyGlobal

INetCfgComponentPropertyUi

INetCfgComponentSetup

OBO_TOKEN

 

 

Send comments about this topic to Microsoft