Using the FortiClient API Setting and monitoring a security policy
FortiClient Endpoint Security Version 4.0 MR1 Administration Guide
04-40001-99556-20090626 55
http://docs.fortinet.com/ • Feedback
This example shows how an application could respond to the OnOutOfCompliance event.
A window opens that lists the out-of-compliance features.
Private Sub VPN1_OnOutOfCompliance(ByVal bAV As Boolean, ByVal
bAS As Boolean, ByVal bFW As Boolean, ByVal bWF As Boolean)
OOCDialog.Show 1
OOCDialog.Text = ""
If bAV Then
OOCDialog.Text = OOCDialog.Text + "Antivirus\n"
End If
If bAS Then
OOCDialog.Text = OOCDialog.Text + "Antispam\n"
End If
If bFW Then
OOCDialog.Text = OOCDialog.Text + "Firewall\n"
End If
If bWF Then
OOCDialog.Text = OOCDialog.Text + "Web Filter"
End If
End Sub
Making the FortiClient application comply with the policy
The FortiClient API includes a method that enables the features required by the security
policy, bringing the application back into compliance. In this example, there is a “Make
Compliant” button.
Private Sub MakeCompliantBtn_Click()
VPN1.MakeSystemPolicyCompliant
End Sub