Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.4 KiB

  1. #if !defined(_FUSION_DLL_WHISTLER_COMPONENTPOLICYTABLE_H_INCLUDED_
  2. #define _FUSION_DLL_WHISTLER_COMPONENTPOLICYTABLE_H_INCLUDED_
  3. #pragma once
  4. #include "fusionhash.h"
  5. #include "policystatement.h"
  6. class CComponentPolicyTableHelper
  7. {
  8. public:
  9. static BOOL HashKey(PCASSEMBLY_IDENTITY AssemblyIdentity, ULONG &rulPseudoKey);
  10. static BOOL CompareKey(PCASSEMBLY_IDENTITY keyin, const PCASSEMBLY_IDENTITY &rtkeystored, bool &rfMatch);
  11. static VOID PreInitializeKey(PCASSEMBLY_IDENTITY &rkey) { rkey = NULL; }
  12. static VOID PreInitializeValue(CPolicyStatement *&rp) { rp = NULL; }
  13. static BOOL InitializeKey(PCASSEMBLY_IDENTITY keyin, PCASSEMBLY_IDENTITY &rtkeystored);
  14. static BOOL InitializeValue(CPolicyStatement * vin, CPolicyStatement * &rvstored);
  15. static BOOL UpdateValue(CPolicyStatement * vin, CPolicyStatement * &rvstored);
  16. static VOID FinalizeKey(PCASSEMBLY_IDENTITY &rkeystored) { if (rkeystored != NULL) { ::SxsDestroyAssemblyIdentity(const_cast<PASSEMBLY_IDENTITY>(rkeystored)); rkeystored = NULL; } }
  17. static VOID FinalizeValue(CPolicyStatement *&rvstored) { if (rvstored != NULL) { FUSION_DELETE_SINGLETON(rvstored); rvstored = NULL; } }
  18. };
  19. typedef CHashTable<PCASSEMBLY_IDENTITY, PCASSEMBLY_IDENTITY, CPolicyStatement *, CPolicyStatement *, CComponentPolicyTableHelper> CComponentPolicyTable;
  20. #endif // !defined(_FUSION_DLL_WHISTLER_COMPONENTPOLICYTABLE_H_INCLUDED_)