Partager via


INetCfgComponentControl::ApplyPnpChanges method

The ApplyPnpChanges method informs the notify object of the network component that it can send configuration information to the component's driver.

Syntax

HRESULT ApplyPnpChanges(
  [in] INetCfgPnpReconfigCallback *pICallback
);

Parameters

  • pICallback [in]
    Pointer to the INetCfgPnpReconfigCallback interface for configuring the driver of the network component that owns the notify object.

Return value

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

Remarks

The network configuration subsystem calls ApplyPnpChanges after calling the INetCfgComponentControl::ApplyRegistryChanges method and after drivers and services for a network component have started. The component's notify object can use the INetCfgPnpReconfigCallback interface that ApplyPnpChanges provides to send configuration information to the component's driver. This driver must be either a TDI provider or an NDIS miniport driver. Using INetCfgPnpReconfigCallback is optional, but recommended to avoid requiring a user to reboot the operating system to implement changes to the configuration.

For example, if a user changes a parameter on a property page that is supplied by the component's notify object, ApplyPnpChanges should send the change to the component's driver. The format of the data that is sent depends entirely on driver requirements.

Because ApplyPnpChanges is the only method that is called after drivers and services have started, all operations that configure the component's driver should be performed within ApplyPnpChanges. The INetCfgPnpReconfigCallback interface simply provides the notify object with a mechanism to send data to the driver. Alternatively, ApplyPnpChanges can call the Win32 DeviceIoControl function to send configuration information directly to the component's driver.

Requirements

Target platform

Desktop

Header

Netcfgn.h (include Netcfgn.h)

See also

INetCfgComponentControl::ApplyRegistryChanges

INetCfgPnpReconfigCallback

 

 

Send comments about this topic to Microsoft