ISecuritySnapshotLog.SubjectType

Syntax

SubjectType: SecuritySubjectType;

Description

The SubjectType property returns a type of the security subject.

Example

Sub main;

Var

MB : IMetabase;

SE : IMetabaseSecurity;

SS : ISecuritySnapshot;

Log: ISecuritySnapshotLog;

Begin

MB := MetabaseClass.Active;

SE := MB.Security;

SS := SE.NewSnapshot;

SS.ApplyFromFile("C:\test.pppolicy");

Log := SS.Log;

Debug.WriteLine("ApplyState SubjectName SubjectType Message");

While Not Log.Eof Do

Select Case (Log.ApplyState As Integer)

Case 0 : Debug.Write("None ");

Case 1 : Debug.Write("Create ");

Case 2 : Debug.Write("Change ");

Case 3 : Debug.Write("Error ");

Case 4 : Debug.Write("Deleted ");

End Select;

Debug.Write(Log.SubjectName + " ");

Select Case (Log.SubjectType As Integer)

Case 1 : Debug.Write("User ");

Case 2 : Debug.Write("Group ");

End Select;

Debug.Write(Log.Message);

Log.Next;

Debug.WriteLine("");

End While;

End Sub main;

After executing the example detailed information about the performed operations while applying security policy is displayed in the console window.

See also:

ISecuritySnapshotLog