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.

79 lines
1.9 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. wssid.h
  5. Abstract:
  6. This module contains the macros, user defined structures & function
  7. definitions needed by whoami.cpp, wsuser.cpp, wssid.cpp and
  8. wspriv.cppfiles.
  9. Authors:
  10. Christophe Robert
  11. Revision History:
  12. 02-July-2001 : Updated by Wipro Technologies.
  13. --*/
  14. #ifndef WSSID_H
  15. #define WSSID_H
  16. //width constants for the fields
  17. #define USERNAME_COL_NUMBER 0
  18. #define SID_COL_NUMBER 1
  19. #define GROUP_NAME_COL_NUMBER 0
  20. #define GROUP_TYPE_COL_NUMBER 1
  21. #define GROUP_SID_COL_NUMBER 2
  22. #define GROUP_ATT_COL_NUMBER 3
  23. #define SLASH L"\\"
  24. #define DASH L"-"
  25. #define BASE_TEN 10
  26. #define SID_STRING L"S-1"
  27. #define AUTH_FORMAT_STR1 L"0x%02hx%02hx%02hx%02hx%02hx%02hx"
  28. #define AUTH_FORMAT_STR2 L"%lu"
  29. #define STRING_SID L"-513"
  30. // ----- Class WsSid -----
  31. class WsSid {
  32. protected:
  33. PSID pSid ; // The SID
  34. BOOL bToBeFreed ; // TRUE if SID must be freed when object destroyed
  35. public:
  36. WsSid ( VOID ) ;
  37. ~WsSid ( VOID ) ;
  38. DWORD DisplayAccountName ( IN DWORD dwFormat,
  39. IN DWORD dwNameFormat) ;
  40. DWORD DisplayGroupName ( OUT LPWSTR wszGroupName,
  41. OUT LPWSTR wszGroupSid,
  42. IN DWORD *dwSidUseName) ;
  43. DWORD DisplaySid ( OUT LPWSTR wszSid ) ;
  44. DWORD GetAccountName ( OUT LPWSTR wszUserName, OUT DWORD *dwSidType ) ;
  45. DWORD GetSidString ( OUT LPWSTR wszSid ) ;
  46. DWORD Init ( OUT PSID pOtherSid ) ;
  47. BOOL EnableDebugPriv(VOID) ;
  48. } ;
  49. #endif