Compartir a través de


INetCfgClassSetup::SelectAndInstall method

Note   This method is deprecated and should not be used.

 

The SelectAndInstall method displays a dialog that lets a user select a network component of a particular class for installation.

Syntax

HRESULT SelectAndInstall(
  [in]            HWND             hwndParent,
  [in, optional]  OBO_TOKEN        *pOboToken,
  [out, optional] INetCfgComponent **ppComponent
);

Parameters

  • hwndParent [in]
    Handle to the window that owns the dialog for selecting a network component of the particular class for installation.

  • pOboToken [in, optional]
    Pointer to a OBO_TOKEN structure describing an entity that requires the installation of a network component. This entity can be the user, another network component, or a software component that is not a network component. If this entity is another network component or a software component, it requires the network component in order to operate properly. If the entity is the user, the network component is being installed simply as a convenience to the user.

  • ppComponent [out, optional]
    Pointer to a buffer that receives a pointer to the INetCfgComponent interface of the network component selected for installation. This parameter is a NULL value if a user does not select a component.

Return value

Returns zero (S_OK) if successful, indicating that a user selected a component to install, and returns HRESULT_FROM_WIN32(ERROR_CANCELLED) if the user canceled the dialog for selecting a network component, Otherwise, returns NETCFG_* codes that are defined in Netcfgx.h.

The Win32 HRESULT_FROM_WIN32 macro maps a Win32 error value into an HRESULT.

Remarks

If there are no setup information (INF) files for the particular class of network components, SelectAndInstall returns a nonzero error code and displays the following message to the user:

"The specified path does not contain any applicable device INFs."

The network configuration subsystem does not install the component until INetCfg::Apply is called.

The class GUID_DEVCLASS_NET used to obtain network card components does not support SelectAndInstall. If notify objects call SelectAndInstall for this class, it returns E_INVALIDARG. Users should select network card components to install through the hardware wizard.

Requirements

Target platform

Desktop

Header

Netcfgx.h (include Netcfgx.h)

See also

INetCfg::Apply

INetCfgComponent

OBO_TOKEN

 

 

Send comments about this topic to Microsoft