How Migration DLLs are Processed

[This is preliminary documentation and subject to change.]

This section provides the order in which the functions in the migration DLL are called and a brief description of each function. Note that if any of the required seven functions is not present, Setup will skip your MIGRAGE.DLL, and your application will not be migrated to the new system.

During the initial portion of Windows NT Setup (that is, while Windows 95 or Windows 98 is still running), the following MIGRATE.DLL functions are called in the order listed.

Function Caller Reason for Call
DllMain (DLL_PROCESS_ATTACH) Windows 95 and Windows 98 Standard call to load the migration DLL from the installation media.
QueryVersion Setup Obtain application ID information (such as the product ID and version number) and determine if further processing is necessary.

After successful processing, the relevant files are copied to the user's hard disk.

DllMain (DLL_PROCESS_DETACH) Windows 95 and Windows 98 The system unloads the migration DLL.
DllMain (DLL_PROCESS_ATTACH) Windows 95 and Windows 98 The system loads the migration DLL from its new location on the local hard disk.
Initialize9x Setup MIGRATE.DLL prepares itself for the migration process. It detects its target application component locations. Then it provides the working and source directories to Windows NT Setup.
MigrateUser9x Setup Setup calls the MigrateUser9x function once for each Windows 95 and Windows 98 user account on the computer being upgraded as well as for the Windows NT Administrator account (that is, the active user account becomes the Windows NT Administrator account after migration). The migration DLL detects the users that have installed its target application.

Setup also calls MigrateUser9x for the default user account if necessary.

If the application is installed for the given user name, the DLL gathers user-specific application information to be used during the MigrateUserNT function call.

MigrateSystem9x Setup The DLL gathers system-wide information concerning its target application and saves private data to be used during the MigrateSystemNT function call.
DllMain (DLL_PROCESS_DETACH) Windows 95 and Windows 98 The system unloads the migration DLL.

During the second portion of Windows NT Setup (that is, when the newly installed Windows NT is running), the following MIGRATE.DLL functions are called in the order listed.

Function Caller Reason for Call
DllMain (DLL_PROCESS_ATTACH) Windows NT The system loads the migration DLL.
InitializeNT Setup Windows NT Setup provides the migration DLL with its working directory, specified during the earlier call to Initialize9x.
MigrateUserNT Setup Setup calls MigrateUserNT once per user. It enables the migration DLL to make changes to a user's application settings.

Note that the number of calls may be less than the number made to MigrateUser9x since some user accounts may not migrate. For example, the default user account may not migrate if that account has never been accessed. As such, a DLL must store its private data on a per-user basis.

MigrateSystemNT Setup The migration DLL makes changes to the system application settings based on the information obtained during the call to MigrateSystem9x.
DllMain (DLL_PROCESS_DETACH) Windows NT The system unloads the migration DLL.

By the time the system calls the DllMain (DLL_PROCESS_ATTACH) function, Setup has done the following:

  1. Copied all 32-bit executables from %windir%\system to %windir%\system32.
  2. Adjusted Window 95 or Windows 98 registry key values within HKU\User\Software and HKLM\Software that contain full paths to files that exist in a new location on Windows NT.
  3. Migrated all system settings, including the registry, program menu items, desktop, recent documents, and other shell settings.
  4. Deleted Windows 95- and Windows 98-specific OLE system objects (not application objects).
  5. Migrated the user shell folders (such as c:\windows\desktop) to the Windows NT equivalent (that is, c:\windows\profiles\<user>\desktop).
  6. Adjusted the paths in .STF files (part of ACME Setup) if necessary (for Beta 2).
  7. Adjusted links and PIFs that point to moved files.

Note In the Windows NT phase of the upgrade process, each DLL function has 60 seconds to complete its processing. If it takes longer, Setup will terminate it.