typedef struct _POLICY_AUDIT_EVENTS_INFO 
{  
BOOLEAN AuditingMode;  
PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;  
ULONG MaximumAuditEventCount;

POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
第二个变量EventAuditingOptions对应着结构POLICY_AUDIT_EVENT_TYPE
typedef enum _POLICY_AUDIT_EVENT_TYPE
{
  AuditCategorySystem ;
  AuditCategoryLogon  ;
  AuditCategoryObjectAccess ; 
  AuditCategoryPrivilegeUse   ; 
AuditCategoryDetailedTracking ;   
AuditCategoryPolicyChange  ;  
AuditCategoryAccountManagement  ; 
AuditCategoryDirectoryService ;  
AuditCategoryAccountLogon;  } POLICY_AUDIT_EVENT_TYPE, *PPOLICY_AUDIT_EVENT_TYPE;对应的功能是组策略中本地策略 审核策略中的每一项,
我想用LsaQueryInformationPolicy查询审核策略中的每一项的值,
但EventAuditingOptions似乎并不与POLICY_AUDIT_EVENT_TYPE对应,
高手们,请问该如何查询出每一项的值呢?

解决方案 »

  1.   

    EventAuditingOptions    Pointer to an array of POLICY_AUDIT_EVENT_OPTIONS variables. Each element in this array specifies the auditing options for an audit event type. The index of each array element corresponds to an audit event type value in the POLICY_AUDIT_EVENT_TYPE enumeration type.    Each POLICY_AUDIT_EVENT_OPTIONS variable in the array can specify the following auditing options. You can also combine the success and failure options, POLICY_AUDIT_EVENT_SUCCESS and POLICY_AUDIT_EVENT_FAILURE.    When LSASetInformationPolicy is called to change the audit policy, any new POLICY_AUDIT_EVENT_OPTIONS array elements are added to any existing audit options. Adding a new POLICY_AUDIT_EVENT_OPTIONS element combined with the POLICY_AUDIT_EVENT_NONE audit option cancels all previous audit options and begins a new set of options.
        Value Meaning    POLICY_AUDIT_EVENT_UNCHANGED
             For set operations, specify this value to leave the current options unchanged. This is the default.    POLICY_AUDIT_EVENT_SUCCESS
             Generate audit records for successful events of this type.    POLICY_AUDIT_EVENT_FAILURE
             Generate audit records for failed attempts to cause an event of this type to occur.    POLICY_AUDIT_EVENT_NONE
             Do not generate audit records for events of this type.