[This is preliminary documentation and subject to change.]
Setup uses QueryVersion to determine if further processing of the DLL is necessary.
LONG
CALLBACK
QueryVersion(
OUT LPCSTR *ProductID,
OUT LPUINT DllVersion,
OUT LPINT *CodePageArray, OPTIONAL
OUT LPCSTR *ExeNamesBuf, OPTIONAL
LPVOID Reserved
);
Note Your migration DLL is responsible for allocating and freeing the ProductID string buffer.
Note DllVersion is not intended to be the DLL binary version number.
If this pointer is NULL, Setup processes all the required functions in the DLL regardless of the installed Windows 95 and Windows 98 code pages. Set this pointer to NULL if the DLL has no language dependencies.
Note Your DLL is responsible for the allocating and freeing memory used by this array.
Set this parameter to NULL if you do not want Setup to search for any particular files.
Note Your migration DLL is responsible for allocating and freeing the ExeNamesBuf string buffer.
ERROR_SUCCESS if your migration DLL found one or more installed components for its target application. This guarantees that Setup will call your migration DLL for later processing.
ERROR_NOT_INSTALLED if your migration DLL initializes properly but did not find any of its components installed on the active Windows 95 or Windows 98 installation. Note that Setup will not call your DLL again if it returns ERROR_NOT_INSTALLED.
Your migration DLL must also return ERROR_SUCCESS if it does not attempt to detect installed components in QueryVersion.
All other return values (Win32 error values) are considered initialization errors. Setup will report the error to the user, clean up your migration DLL files, and ask the user to continue or cancel the Windows NT installation process.
An exception generated by a migration DLL causes Setup to report RPC error messages. Setup will provide more information in SETUPERR.LOG.
Setup uses QueryVersion to determine if further processing of the DLL is necessary. During this call, your migration DLL (located on a floppy, compact disc, or network share) must provide Setup with the ProductID, DllVersion, CodePageArray, and ExeNamesBuf information. At this point, your migration DLL cannot make any changes to the system.
Your migration DLL should try to determine if the target application is installed on the computer, and then return the appropriate result from QueryVersion. The system unloads the migration DLL after QueryVersion returns. Setup copies it to the local hard disk and calls Initialize9x only if QueryVersion returns ERROR_SUCCESS.
During the call to QueryVersion, Setup finds all occurrences of files listed in the ExeNamesBuf string (if not NULL) and writes their locations to the [Migration Paths] section of MIGRATE.INF. These paths are then available to the other functions in your migration DLL.
Setup detects duplicate migration DLLs by comparing the ProductID strings of supplied DLLs. It only processes the DLL with the highest DllVersion number. The user is not notified of duplicates found.
Important DllVersion number zero (0) is reserved for Windows NT Setup-provided migration DLLs. DLLs not supplied by Microsoft Windows NT with the Windows NT 5.0 compact disc must not use this value.