Compartir a través de


PostUpgradeInitialize 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 PostUpgradeInitialize function. PostUpgradeInitialize supplies the DLL with information about the upgrade environment. PostUpgradeInitialize also supplies NetSetup with vendor information.

Syntax

LONG __stdcall PostUpgradeInitialize(
  _In_  LPCTSTR        swWorkingDir,
  _In_  NetUpgradeInfo *pNetUpgradeInfo,
  _Out_ VENDORINFO     *pviVendorInfo,
  _Out_ LPVOID         pvReserved
);

Parameters

  • swWorkingDir [in]
    Complete path of the directory in which the network migration DLL stored temporary files during the Winnt32 phase of the operating system upgrade and which NetSetup supplied to the DLL's PreUpgradeInitialize function.

  • pNetUpgradeInfo [in]
    Source and target operating systems involved in the upgrade. This information is formatted as a NetUpgradeInfo structure, which is defined as follows:

    typedef struct NetUpgradeInfo {
        ProductInfo From;
        ProductInfo To;
    };
    

    The members of the NetUpgradeInfo structure contain the following data:

    • From
      Operating system from which the component is being upgraded. This information is formatted as a ProductInfo structure, which is defined as follows:

      typedef struct ProductInfo {
          PRODUCTTYPE  ProductType;
          DWORD        dwBuildNumber;
      };
      

      The members of the ProductInfo structure contain the following data:

      ProductType

      Operating system from which the component is being upgraded as one of the following:

      NT_SERVER

      Microsoft Windows NT Server

      NT_WORKSTATION

      Microsoft Windows NT Workstation

      UNKNOWN

      Unknown product type

    dwBuildNumber

    Build number of the operating system from which the component is being upgraded as either of the following:

    1057

    Microsoft Windows NT version 3.51

    1381

    Microsoft Windows NT version 4.0

To

Operating system to which the component is being upgraded. This information is formatted as a ProductInfo structure, which is defined as follows:

typedef struct ProductInfo {
    PRODUCTTYPE  ProductType;
    DWORD        dwBuildNumber;
};

The members of the ProductInfo structure contain the following data:

ProductType

Operating system to which the component is being upgraded as one of the following:

NT_SERVER

Microsoft Windows NT Server

NT_WORKSTATION

Microsoft Windows NT Workstation

UNKNOWN

Unknown product type

dwBuildNumber

Build number of the operating system to which the component is being upgraded as either of the following:

2195

Microsoft Windows 2000

2416 or later

Microsoft Windows XP

pviVendorInfo [out]

Vendor 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

Vendor's telephone number for technical support.

szSupportUrl

URL for the vendor's web site that provides technical support.

szInstructionsToUser

Additional instructions that pertain to the upgrade DLL.

pvReserved [out]

Reserved.

Return value

PostUpgradeInitialize can return one of the following:

Return code Description
ERROR_SUCCESS

The migration DLL found one or more installed components.

ERROR_XXX

A Win32 error code that 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

NetSetup calls a network migration DLL's PreUpgradeInitialize function once during the GUI-mode phase of the operating system upgrade. NetSetup calls PreUpgradeInitialize before calling the DLL's DoPostUpgradeProcessing function.

The PostUpgradeInitialize function supplies the network migration DLL with information about the source operating system and the target operating system. Specifically, the PostUpgradeInitialize function specifies the product type (Microsoft Windows NT Workstation or Microsoft Windows NT Server) and build number of:

  • The product type and build number of the operating system being upgraded

  • The product type and build number of the operating system being installed

The PostUpgradeInitialize function also supplies the complete path to the directory in which the network migration DLL stored temporary files during the Winnt32 phase of the operating system upgrade.

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

If an error occurs, PostUpgradeInitialize returns a Win32 error code. NetSetup reports the error to the user, cleans up the upgrade DLL files, and asks the user to quit or continue the installation of the operating system.

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

DoPostUpgradeProcessing

DoPreUpgradeProcessing

PreUpgradeInitialize

 

 

Send comments about this topic to Microsoft