|
|
using System;using System.Collections;using System.ComponentModel;using System.Data;using System.IO ;namespace SearchEvents{class Class1{[STAThread]static void Main(string[] args){try{//Create a RightsManagementServiceService objectRightsManagementServiceService rmClient = new RightsManagementServiceService();rmClient.Credentials = new System.Net.NetworkCredential("administrator", "password");//Create an EventSpec objectEventSpec eventSpec = new EventSpec();//Specify the POLICY_CREATE_EVENTeventSpec.eventCode = 3003;//Search for the POLICY_CREATE_EVENTmapItem[] result = rmClient.searchForEvents(eventSpec);//Determine the number of times that this event has occurredint numTimes = 0;for (int i = 0; i < result.Length; i++){String myKey = (String)(result[i].key);if (myKey == "count"){numTimes = (int)(result[i].value);}}Console.WriteLine("The POLICY_CREATE_EVENT has occurred "+ numTimes +" times.");}catch (Exception ee){Console.WriteLine(ee.Message);}}}}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/quickStarts_RightsManagement.15.18.html