Share via


DoPostUpgradeProcessing function

This function is obsolete for Microsoft Windows XP (SP1 and later), Microsoft Windows Server 2003, and later operating systems.

If a network migration DLL is called during the GUI-mode phase of the operating system upgrade, it must supply a DoPreUpgradeProcessing function.

The DoPostUpgradeProcessing function can:

  • Read a network component's preupgrade parameter values from the AnswerFile

  • Display a user interface that lets users specify parameter values, and

  • Write a network component's preupgrade parameter values to the registry of the upgraded operating system.

Syntax

LONG __stdcall DoPostUpgradeProcessing(
  _In_  HWND       hParentWindow,
  _In_  HKEY       hkeyParams,
  _In_  LPCTSTR    szPreNT5Instance,
  _In_  LPCTSTR    szNT5InfId,
  _In_  HINF       hinfAnswerFile,
  _In_  LPCTSTR    szSectionName,
  _Out_ VENDORINFO *pviVendorInfo,
  _In_  LPVOID     pvReserved
);

Parameters

  • hParentWindow [in]
    Handle to the parent window for any user interface displayed by the network migration DLL. If hParentWindow is NULL, then NetSetup is running in unattended mode and the DLL cannot display a user interface.

  • hkeyParams [in]
    Handle to the registry key that contains the parameters of the network component being upgraded. For example, if TCP/IP is the component being upgraded, this function returns a handle to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\Tcpip.

  • szPreNT5Instance [in]
    Component's service (device driver) name. For a component that is a not network adapter, szPreNT5Instance is the component's service (device driver) name. For a network adapter, szPreNT5Instance is the adapter's service name followed by an instance number as the suffix. Multiple instances of the same adapter are differentiated by unique instance numbers. For example, a value of adapter1 specifies the adapter driver's service name (adapter) and the instance (1) of the adapter.

  • szNT5InfId [in]
    Windows 2000 or later hw-id (also known as the device, hardware, or component ID) for the network component to be upgraded. The hw-id is specified in the Models section of the component's INF file for Windows 2000 or later operating systems.

  • hinfAnswerFile [in]
    Handle to the opened AnswerFile.

  • szSectionName [in]
    This section contains the preupgrade parameter values of the network component being upgraded. The szSectionName parameter has the following format:

    params.postupgrade-ID.OemSection

    where

    postupgrade-ID is the Windows 2000 or later hw-id of the network component to be upgraded.

Name of the network component's OEM-section in the AnswerFile.

pviVendorInfo [out]

Vendor-specific information, formatted as a VENDORINFO structure, which is defined as follows:

typedef struct {
    WCHAR szCompanyName[256];
    WCHAR szSupportNumber[256];
    WCHAR szSupportUrl[256];
    WCHAR szInstructionsToUser[1024];
} VENDORINFO;

The members of the VENDORINFO structure contain the following data:

szCompanyName

Name of the vendor.

szSupportNumber

Telephone number for technical support.

szSupportUrl

URL for a Web site that provides technical support.

szInstructionsToUser

Additional instructions that pertain to the network migration DLL.

pvReserved [in]

Reserved.

Return value

The DoPostUpgradeProcessing function can return either of the following:

Return code Description
ERROR_SUCCESS

DoPostUpgradeProcessing succeeded.

ERROR_ XXX

A Microsoft Win32 error code that specifies the cause of the failure and which causes NetSetup to display an error message, clean up the network migration DLL files, and prompt the user to quit the upgrade of the operating system.

 

Remarks

If a network migration DLL's DoPreUpgradeProcessing function sets the NUA_LOAD_POST_UPGRADE flag, NetSetup calls the migration DLL during the GUI mode portion of the upgrade process, which runs on the upgraded operating system.

During the GUI mode phase, the migration DLL can

  • Input, for each network component being upgraded, user-specified parameter values

  • Read preupgrade parameter values from the AnswerFile (winnt.sif)

  • Write parameter values to the registry key for which hkeyParams is the handle

NetSetup uses the AnswerFile during the operating system upgrade to migrate network components to the upgraded operating system.

If a network migration DLL is called by NetSetup during the GUI mode phase of the upgrade process, it must export a DoPostUpgradeProcessing function and also a PostUpgradeInitialize function. After NetSetup calls PostUpgradeInitialize, it calls DoPostUpgradeProcessing once for each network component to be upgraded.

The szPreNT5Instance and szNT5InfId supplied by NetSetup to DoPostUpgradeProcessing identify the component that is being upgraded. If the migration DLL is not running in unattended mode, it can display a user interface under the parent window specified by hParentWindow.

The DoPostUpgradeProcessing function reads the AnswerFile section specified by szSectionName to obtain the preupgrade parameter values for the component being upgraded. DoPostUpgradeProcessing uses the handle to the AnswerFile supplied at hinfAnswerFile to access the AnswerFile. DoPostUpgradeProcessing uses SetupXxx functions to access the AnswerFile. For more information about SetupXxx functions, see the Microsoft Windows SDK documentation.

From the specified section of the AnswerFile, DoPostUpgradeProcessing reads component-specific parameter values that the migration DLL's DoPreUpgradeProcessing function wrote during the Winnt32 phase of the upgrade process. DoPreUpgradeProcessing calls the appropriate SetupGetXxx function to read the parameter values from the specified AnswerFile section.

The DoPostUpgradeProcessing function writes the parameters obtained from the AnswerFile, as well as any parameter values supplied by the user, to the upgraded component's Parameters registry key, for which hkeyParams is the handle.

DoPostUpgradeProcessing passes a pointer ( pviVendorInfo) to NetSetup that points to vendor information formatted as a VENDORINFO structure. NetSetup displays this information if DoPostUpgradeProcessing returns a Win32 error code.

Requirements

Target platform

Desktop

Version

Obsolete for Microsoft Windows XP with SP1 and later service packs, Microsoft Windows Server 2003, and later operating systems.

Header

Oemupgex.h (include OemUpGex.h)

See also

DoPreUpgradeProcessing

DoPreUpgradeProcessing

PostUpgradeInitialize

PreUpgradeInitialize

 

 

Send comments about this topic to Microsoft