Click here to Skip to main content
15,891,184 members
Articles / Desktop Programming / MFC

Query the New Windows Audit Policies Programmatically

Rate me:
Please Sign up or sign in to vote.
4.08/5 (7 votes)
26 Feb 2010CPOL3 min read 54.1K   2K   14  
This sample show how to access the information retrieved by running Auditpol.
#pragma once

#include <vector>
#include <string>
using namespace std;

//	Forwarded declaration
class CAuditPolicy;

class CAuditPolicySubCategory
{
public:
	CAuditPolicySubCategory(GUID* const);
	~CAuditPolicySubCategory();

	//	Retrieve its GUID
	const GUID* GetGuid() const;

	//	Retrieve its User Friendly Name
	wstring GetFriendlyName();

	//	Enumerate the Audit System Policy
	CAuditPolicy* GetAuditSystemPolicy();

private:
	void CleanAuditSystemPolicyCollection();

	GUID* const m_pGuid;
	PWSTR  m_pName;
	CAuditPolicy* m_policy;
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer winitor
Germany Germany
Marc Ochsenmeier is the author of pestudio (www.winitor.com) and worked as developer with the focus on Windows Security. He now works as a Malware Analyst

pestudio is on twitter at: https://twitter.com/ochsenmeier

Comments and Discussions