SetupAPI supports functions that installation applications, class installers, and co-installers can use to write log entries in the SetupAPI text logs, as follows:
To write log entries in a SetupAPI text log, an installation application calls SetupWriteTextLog, SetupWriteTextLogError, or SetupWriteTextLogInfLine. For more information about how to write text log entries, see Writing Log Entries in a Text Log.
SetupAPI supports a mechanism to establish a log context for a thread. A log context is established for a thread by setting a log token for the thread. To set a log token for a thread, an installation application calls SetupSetThreadLogToken. To retrieve a log token for a thread, an installation application calls SetupGetThreadLogToken.
For more information about log tokens, see Log Tokens.
For more information about how to use log tokens, see Setting and Getting a Log Token for a Thread.