共用方式為


INetCfgComponentSetup::Install method

The Install method directs the notify object of the network component to perform operations required to install the component.

Syntax

HRESULT Install(
  [in] DWORD dwSetupFlags
);

Parameters

  • dwSetupFlags [in]
    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 can also contain values from the following NETWORK_UPGRADE_TYPE enumeration:

    Value Description

    NSF_WIN95_UPGRADE

    Upgrade from Windows 95/98/Me.

    NSF_WINNT_WKS_UPGRADE

    Upgrade from Windows NT 4.0 Workstation.

    NSF_WINNT_SVR_UPGRADE

    Upgrade from Windows NT 4.0 Server.

    NSF_WINNT_SBS_UPGRADE

    Upgrade from Windows NT 4.0 Small Business Server.

     

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 performs installation operations.

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

Install should not modify the registry. Only the INetCfgComponentControl::ApplyRegistryChanges method should make changes to the registry. The network configuration subsystem first calls Install to perform the operations required to install the component and to set a variable specifying that the action notify object performs is an install. The network configuration subsystem then calls ApplyRegistryChanges to set information about the network component in the registry.

Requirements

Target platform

Desktop

Header

Netcfgn.h (include Netcfgn.h)

See also

INetCfgComponentControl::ApplyRegistryChanges

 

 

Send comments about this topic to Microsoft