Platform SDK: Debugging and Error Handling

OpenBackupEventLog

The OpenBackupEventLog function opens a handle to a backup event log. This handle can be used with the BackupEventLog function.

HANDLE OpenBackupEventLog(
  LPCTSTR lpUNCServerName,  // backup file server name
  LPCTSTR lpFileName        // backup file name
);

Parameters

lpUNCServerName
[in] Pointer to a null-terminated string that specifies the Universal Naming Convention (UNC) name of the server on which this operation is to be performed.
lpFileName
[in] Pointer to a null-terminated string that specifies the name of the backup file.

Return Values

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

The backup file cannot be written to a remote server because this function is implemented by a service running in the LocalSystem account, which does not have credentials on the remote machine. However, it is possible to write the file to a remote machine using a null session.

If the backup filename specifies a remote server, lpUNCServerName must be NULL.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Unsupported.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Advapi32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

See Also

Event Logging Overview, Event Logging Functions, BackupEventLog