Compartir a través de


INetCfgClassSetup::Install method

The Install method informs a class of network components to install the network component specified by a component identifier.

Syntax

HRESULT Install(
  [in]            LPCWSTR          pszwComponentId,
  [in, optional]  OBO_TOKEN        *pOboToken,
  [in, optional]  DWORD            dwSetupFlags,
  [in, optional]  DWORD            dwUpgradeFromBuildNo,
  [in, optional]  LPCWSTR          pszwAnswerFile,
  [in, optional]  LPCWSTR          pszwAnswerSections,
  [out, optional] INetCfgComponent **ppComponent
);

Parameters

pszwComponentId [in]

Pointer to a constant null-terminated string of 16-bit Unicode characters containing the identifier of the component to install.

pOboToken [in, optional]

Pointer to a OBO_TOKEN structure describing an entity that requires the installation of the specified network component. If the component to install is of the class GUID_DEVCLASS_NET, this parameter is optional and set to a NULL value. Otherwise, this parameter is mandatory. The network configuration subsystem only installs one instance of the component. When networking initially installs, and with subsequent networking installs, Install increments the component's reference count on behalf of the specified token.

dwSetupFlags [in, optional]

Specifies a mask enumerating the type of installation and the type of operating system from which to install. A notify object can support a combination of values. The bitmask can contain values from the following NETWORK_INSTALL_TIME enumeration:

Value Description

NSF_PRIMARYINSTALL

Operating system installation.

NSF_POSTSYSINSTALL

Network installation on an operating system that previously did not have networking.

 

The bitmask also can contain values from the following NETWORK_UPGRADE_TYPE enumeration:

Value Description

NSF_WIN95_UPGRADE

Upgrading Windows 95/98/Me.

NSF_WINNT_WKS_UPGRADE

Upgrading Windows NT 4.0 Workstation.

NSF_WINNT_SVR_UPGRADE

Upgrading Windows NT 4.0 Server.

NSF_WINNT_SBS_UPGRADE

Upgrading Windows NT 4.0 Small Business Server.

 

dwUpgradeFromBuildNo [in, optional]

If the dwSetupFlags parameter contains NSF_WINNT_WKS_UPGRADE, NSF_WINNT_SVR_UPGRADE, or NSF_WINNT_SBS_UPGRADE, this parameter identifies the build number from which to upgrade.

If the dwSetupFlags parameter contains NSF_WIN95_UPGRADE, this parameter is ignored.

pszwAnswerFile [in, optional]

Pointer to a constant null-terminated string of 16-bit Unicode characters containing the full path and name of the file for unattended setup to open.

pszwAnswerSections [in, optional]

Pointer to a constant null-terminated string of 16-bit Unicode characters containing a comma-separated list of section names in the file for unattended setup. This list is used to retrieve parameters for the network component.

ppComponent [out, optional]

Pointer to a buffer that optionally receives a pointer to the INetCfgComponent interface of the network component that the Install method installed. This is NULL if the interface is not available.

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 Install installs the component.

NETCFG_E_NEED_REBOOT

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

 

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

 

Remarks

The network configuration subsystem calls Install during an upgrade to the operating system or during the install of networking on an operating system that previously did not have networking.

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

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

Requirements

Target platform

Desktop

Header

Netcfgx.h (include Netcfgx.h)

See also

INetCfg::Apply

INetCfgComponent

INetCfgComponentNotifyBinding

INetCfgComponentNotifyGlobal

INetCfgComponentPropertyUi

INetCfgComponentSetup

OBO_TOKEN

 

 

Send comments about this topic to Microsoft