HrESEBackupGetTruncateLogFiles Function

Topic Last Modified: 2006-06-12

The HrESEBackupGetTruncateLogFiles function returns the list of log files related to the storage group that is being backed up. The log files indicated will be deleted after they are backed up.

Applies To

ESEbcli2 DLL Functions Interface

Syntax

HRESULT HrESEBackupGetTruncateLogFiles
(
        HCCX hccsBackupContext,
        wchar** pwszFiles
);

Parameters

  • hccsBackupContext
    Input parameter. The backup context handle returned by the HrESEBackupPrepare Function in the phccxBackupContext parameter.
  • pwszFiles
    Output parameter. A buffer holding a list of log files that will be truncated when the backup completes.

Return Value

The following return codes can be returned. To retrieve the error string for an Exchange Storage Engine (ESE) error, use the standard FormatMessage function. For the general errors hrErrorFromESECall and hrErrorFromCallbackCall, more information about the error is available using the standard GetLastError function.

S_OK

Success.

ESE-specific error codes

ESE-specific error codes, as defined in esebkmsg.h.

Other

Other Microsoft® Win32® or remote procedure call (RPC) errors.

Remarks

The buffer returned in pwszFile contains individual file names separated by a single NULL character. The last file name in the buffer is followed by two consecutive NULL characters.

Important

The pwszFile buffer returned by this function is not a NULL-terminated string. Do not attempt to use string-manipulation functions that rely on having a single NULL character that terminates the string, because those functions cannot copy the entire string. This can potentially result in failed backups and corrupted databases.

The memory allocated for pwszFile is freed when the application calls the ESEBackupFree Function.

Applications that use this function must be run under a user account that has Microsoft Windows® server operating systems Backup and Restore privileges.