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.

56 lines
1.4 KiB

  1. /*++
  2. Microsoft Windows
  3. Copyright (C) Microsoft Corporation, 1981 - 2000
  4. Module Name:
  5. usrinfo.hxx
  6. Abstract:
  7. see comments in usrinfo.cxx
  8. Author:
  9. Rahul Thombre (RahulTh) 2/28/2000
  10. Revision History:
  11. 2/28/2000 RahulTh Created this module.
  12. --*/
  13. #ifndef __USRINFO_HXX_E88D1E03_1262_4030_919F_EF7F3F096014__
  14. #define __USRINFO_HXX_E88D1E03_1262_4030_919F_EF7F3F096014__
  15. class CUsrInfo
  16. {
  17. private:
  18. WCHAR * _pwszNameBuf;
  19. const WCHAR * _pwszUserName;
  20. const WCHAR * _pwszDomain;
  21. WCHAR * _pwszHomeDir;
  22. BOOL _bAttemptedGetUserName; // Attempted to get the user name.
  23. BOOL _bAttemptedGetHomeDir; // Attempted to get the home directory.
  24. DWORD _StatusUserName; // Status code trying to obtain username.
  25. DWORD _StatusHomeDir; // Status code trying to obtain homedir.
  26. CRsopContext * _pPlanningModeContext; // planning mode context information
  27. public:
  28. CUsrInfo ();
  29. ~CUsrInfo ();
  30. void ResetMembers (void);
  31. const WCHAR * GetUserName (DWORD & StatusCode);
  32. const WCHAR * GetHomeDir (DWORD & StatusCode);
  33. void SetPlanningModeContext( CRsopContext* pRsopContext );
  34. private:
  35. DWORD GetPlanningModeSamCompatibleUserName( WCHAR* pwszUserName, ULONG* pcchUserName );
  36. };
  37. #endif //__USRINFO_HXX_E88D1E03_1262_4030_919F_EF7F3F096014__