SetupLogFileW function (setupapi.h)
[This function is available for use in the operating systems indicated in the Requirements section. It may be altered or unavailable in subsequent versions. SetupAPI should no longer be used for installing applications. Instead, use the Windows Installer for developing application installers. SetupAPI continues to be used for installing device drivers.]
The SetupLogFile function adds an entry to the log file.
WINSETUPAPI BOOL SetupLogFileW(
[in] HSPFILELOG FileLogHandle,
[in] PCWSTR LogSectionName,
[in] PCWSTR SourceFilename,
[in] PCWSTR TargetFilename,
[in] DWORD Checksum,
[in] PCWSTR DiskTagfile,
[in] PCWSTR DiskDescription,
[in] PCWSTR OtherInfo,
[in] DWORD Flags
);
[in] FileLogHandle
Handle to the file log as returned by SetupInitializeFileLog. The caller must not have passed SPFILELOG_QUERYONLY when the log file was initialized.
[in] LogSectionName
Optional pointer to the name for a logical grouping of names within the log file. You should use a null-terminated string. Required if SPFILELOG_SYSTEMLOG was not passed when the file log was initialized. Otherwise, this parameter can be NULL.
[in] SourceFilename
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. You should use a null-terminated string.
[in] TargetFilename
Name of the file as it exists on the target. This name should be in whatever format is meaningful to the caller. You should use a null-terminated string.
[in] Checksum
Optional pointer to a checksum value. Required for the system log.
[in] DiskTagfile
Optional pointer to the tagfile for the media from which the file was installed. You should use a null-terminated string. The null-terminated string should not exceed the size of the destination buffer. Ignored for the system log if SPFILELOG_OEMFILE is not specified. Required for the system log if SPFILELOG_OEMFILE is specified. Otherwise, this parameter can be NULL.
[in] DiskDescription
Optional pointer to the human-readable description of the media from which the file was installed. You should use a null-terminated string. Ignored for the system log if SPFILELOG_OEMFILE is not specified in the Flags parameter. Required for the system log if SPFILELOG_OEMFILE is specified in the Flags parameter. Otherwise, this parameter can be NULL.
[in] OtherInfo
Optional pointer to additional information to be associated with the file. You should use a null-terminated string. This parameter can be NULL.
[in] 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.
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Note
The setupapi.h header defines SetupLogFile as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | setupapi.h |
Library | Setupapi.lib |
DLL | Setupapi.dll |