[This is preliminary documentation and subject to change.]
Windows NT Setup automatically logs errors returned by your migration DLL code. To log the errors your migration DLL detects, you must use the new Setup API SetupLogError function.
BOOL
SetupLogError(
IN LPCTSTR MessageString,
IN LogSeverity ErrorSeverity
);
If ErrorSeverity level is LogSevWarning, LogSevError, or LogSevFatalError, a copy of the error message will also be saved to the %Windir%SETUPERR.LOG file.
Before logging an error, the log file must be opened using SetupOpenLog. SetupCloseLog must be used to close it after the error is written.
Note Opening and closing a log file can be done in the DLLMain function of a migration DLL. See sample source code for example.