IAuditLogArchiveCallback.OnProgress

Syntax

OnProgress(Current: Integer; Total: Integer);

Parameters

Current. Number of processed records.

Total. Total number of records to be checked.

Description

The OnProgress method implements an event of common status of access protocol archiving. This method has to be redefined in a custom class.

Example

Executing the example requires the AuditLog.pplog file.

Add a link to the Metabase system assembly.

Class MyCallback: Object, IAuditLogArchiveCallback
    
Sub OnProgress(Current: Integer; Total: Integer);
    
Begin
        Debug.WriteLine(
"Packed " + Current.ToString + " from " + Total.ToString + " records");
    
End Sub OnProgress;
End Class MyCallback;

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    AL: IAuditLog;
    Callback: MyCallback;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    
// Open access protocol
    Al := MS.OpenAuditLog;
    Callback := 
New MyCallback.Create;
    
// Save access protocol to file
    AL.Archive("C:\AuditLog.pplog", Callback);
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example, access protocol records will be saved to the AuditLog.pplog file. Saving status is displayed in the development environment console.

See also:

IAuditLogArchiveCallback