SetupLogFile
The SetupLogFile function adds an entry to the log file.
BOOL SetupLogFile(
HSPFILELOG FileLogHandle, // handle to the log file
PCTSTR LogSectionName, // optional, name to group files by
PCTSTR SourceFileName, // filename on source media
PCTSTR TargetFileName, // filename in target directory
DWORD Checksum, // optional, 32-bit checksum value
PCTSTR DiskTagfile, // optional, source media tag file
PCTSTR DiskDescription, // optional, media description
PCTSTR OtherInfo, // optional, additional information
DWORD Flags // indicates whether OEM file
);
Parameters
-
FileLogHandle
-
Supplies the handle to the file log as returned by SetupInitializeFileLog. The caller must not have passed SPFILELOG_QUERYONLY when the log file was initialized.
-
LogSectionName
-
This optional parameter supplies the name for a logical grouping of names within the log file. Required if SPFILELOG_SYSTEMLOG was not passed when the file log was initialized. Otherwise, LogSectionName is optional.
-
SourceFileName
-
Supplies the name of the file as it exists on the source media from which it was installed. This name should be in whatever format is meaningful to the caller.
-
TargetFileName
-
Supplies the name of the file as it exists on the target. This name should be in whatever format is meaningful to the caller.
-
Checksum
-
This optional parameter supplies a 32-bit checksum value. Required for the system log.
-
DiskTagfile
-
This optional parameter specifies the tagfile for the media from which the file was installed. Required for the system log if SPFILELOG_OEMFILE is specified. Ignored for the system log if SPFILELOG_OEMFILE is not specified.
-
DiskDescription
-
This optional parameter provides the human-readable description of the media from which the file was installed. Required for the system log if SPFILELOG_OEMFILE is specified in the Flags parameter. Ignored for the system log if SPFILELOG_OEMFILE is not specified in the Flags parameter.
-
OtherInfo
-
This optional parameter supplies additional information to be associated with the file.
-
Flags
-
This parameter can be SPFILELOG_OEMFILE, which is meaningful only for the system log and indicates that the file is not supplied by Microsoft. This parameter can be used to convert an existing file's entry, such as when an OEM overwrites a Microsoft-supplied system file.
Return Values
If the function succeeds, the return value is a non-zero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
QuickInfo
Windows NT: Use version 4.0 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in setupapi.h.
Import Library: Link with setupapi.lib.
See Also
Overview, Functions, SetupRemoveFileLogEntry