GenerateAuditTrail
Generates audit log for the event for which this function is being called.
Public Function GenerateAuditTrail(ByRef AuditLog() As Byte) As Long
Parameters
In/out |
Name |
Data type |
Description |
In
|
AuditLog |
Byte[TAGAUDITLOGEX] |
Byte array for the structure 'TagAuditLogEx' |
Description
This function is called for both shared and local cabinet from both admin and desktop. This function generates the audit log for the corresponding event for which this function is called.
Return value
Name |
Description |
1 |
In case of success |
-1 |
Invalid cabinet name |
-3 |
Cabinet not connected |
-201 |
Insufficient rights for the current operation |
-133 |
User not logged in |
Example
Dim AuditInfo As TAGAUDITLOGEX
Dim AuditLogId As Long
Dim ActionId As Long
Dim Category As String * 1
Dim ActiveObjectId As Long
Dim ActiveObjectType As String * 1
Dim SubsdaryObjectId As Long
Dim SubsdiaryObjectType As String * 1
Dim userId As Long
Dim DateTime As String * 30
Dim Comment As String * 255
Dim auditlog As Byte
Dim lRetVal As Long
Dim gPDb As PanDb.pdbCls
Set gPDb = New PanDb.pdbCls
AuditInfo.ActionId = 57
AuditInfo.AuditLogId = 0
AuditInfo.Category = “D”
AuditInfo.Comment = “New Document”
AuditInfo.SubsdaryObjectId = 24
AuditInfo.SubsdaryObjectType = “F”
AuditInfo.UserId = 13
AuditInfo.sDateTime = "12/03/2003"
AuditInfo.sComment = "Generating Log"
Redim auditlog(len(AuditInfo) - 1)
Call CopyMemory(auditlog(0), AuditInfo, Len(AuditInfo))
lRetVal=gPDb.GenerateAuditTrail(auditlog)
if lRetVal <> NG_SUCCESS Then
MsgBox gPDb.ErrDescription, vbInformation
Screen.MousePointer = vbNormal
Exit Sub