The Install method informs a class of network components to install the network component specified by a component identifier.
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 );
- 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:
Operating system installation.
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:
Upgrading Windows 95/98/Me.
Upgrading Windows NT 4.0 Workstation.
Upgrading Windows NT 4.0 Server.
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.
Returns zero (S_OK) if successful; otherwise, returns one of the following codes:
A system reboot is required after Install installs the component.
A system reboot is required before the component can be installed.
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.