Source code of Windows XP (NT5)
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.

52 lines
883 B

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. Trstlist.h : header file
  5. File History:
  6. JonY Apr-96 created
  7. --*/
  8. #include <windows.h>
  9. #include <lm.h>
  10. #include <ntsecapi.h> // \mstools\security\ntsecapi.h
  11. #include <tchar.h>
  12. class CTrustList
  13. {
  14. public:
  15. TCHAR** m_ppszTrustList; // array of trust elements
  16. DWORD m_dwTrustCount; // number of elements in m_ppszTrustList
  17. CTrustList();
  18. ~CTrustList();
  19. BOOL BuildTrustList(LPTSTR Target);
  20. private:
  21. BOOL IsDomainController(LPTSTR Server,
  22. LPBOOL bDomainController);
  23. BOOL EnumTrustedDomains(LSA_HANDLE PolicyHandle);
  24. BOOL AddTrustToList(PLSA_UNICODE_STRING UnicodeString);
  25. //
  26. // helper functions
  27. //
  28. void InitLsaString(PLSA_UNICODE_STRING LsaString,
  29. LPTSTR String);
  30. NTSTATUS OpenPolicy(LPTSTR ServerName,
  31. DWORD DesiredAccess,
  32. PLSA_HANDLE PolicyHandle);
  33. };