SetupLogFileA function

[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.

Syntax

WINSETUPAPI BOOL SetupLogFileA(
  HSPFILELOG FileLogHandle,
  PCSTR      LogSectionName,
  PCSTR      SourceFilename,
  PCSTR      TargetFilename,
  DWORD      Checksum,
  PCSTR      DiskTagfile,
  PCSTR      DiskDescription,
  PCSTR      OtherInfo,
  DWORD      Flags
);

Parameters

FileLogHandle

Handle to the file log as returned by SetupInitializeFileLog. The caller must not have passed SPFILELOG_QUERYONLY when the log file was initialized.

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.

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.

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.

Checksum

Optional pointer to a checksum value. Required for the system log.

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.

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.

OtherInfo

Optional pointer to additional information to be associated with the file. You should use a null-terminated string. This parameter can be NULL.

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 Value

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.

Requirements

   
Windows version Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header setupapi.h
Library Setupapi.lib
DLL Setupapi.dll

See Also

Functions

Overview

SetupRemoveFileLogEntry