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.

36 lines
772 B

  1. #pragma warning (disable:4121)
  2. #include "ntsecapi.h"
  3. #ifndef STATUS_SUCCESS
  4. #define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
  5. #define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105L)
  6. #define STATUS_NO_MORE_ENTRIES ((NTSTATUS)0x8000001AL)
  7. #endif
  8. #define POLICY_PRIMARY_DOMAIN_INFORMATION PolicyPrimaryDomainInformation
  9. VOID
  10. InitLsaString (
  11. OUT PLSA_UNICODE_STRING LsaString,
  12. IN PWSTR String
  13. );
  14. NTSTATUS
  15. OpenPolicy (
  16. IN PWSTR ServerName,
  17. IN DWORD DesiredAccess,
  18. OUT PLSA_HANDLE PolicyHandle
  19. );
  20. BOOL
  21. GetPrimaryDomainName (
  22. OUT PTSTR DomainName
  23. );
  24. BOOL
  25. GetPrimaryDomainSid (
  26. OUT PBYTE DomainSid,
  27. IN UINT BufferSize
  28. );