OpenBackupEventLogA function (winbase.h)
Opens a handle to a backup event log created by the BackupEventLog function.
Syntax
HANDLE OpenBackupEventLogA(
[in] LPCSTR lpUNCServerName,
[in] LPCSTR lpFileName
);
Parameters
[in] lpUNCServerName
The Universal Naming Convention (UNC) name of the remote server on which this operation is to be performed. If this parameter is NULL, the local computer is used.
[in] lpFileName
The full path of the backup file.
Return value
If the function succeeds, the return value is a handle to the backup event log.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Remarks
If the backup filename specifies a remote server, the lpUNCServerName parameter must be NULL.
When this function is used on Windows Vista and later computers, only backup event logs that were saved with the BackupEventLog function on Windows Vista and later computers can be opened.
Note
The winbase.h header defines OpenBackupEventLog as an alias which 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 not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winbase.h (include Windows.h) |
Library | Advapi32.lib |
DLL | Advapi32.dll |
API set | ext-ms-win-advapi32-eventlog-ansi-l1-1-0 (introduced in Windows 10, version 10.0.10240) |