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.

62 lines
1.5 KiB

  1. /*++
  2. Microsoft Windows
  3. Copyright (C) Microsoft Corporation, 1981 - 2000
  4. Module Name:
  5. path.hxx
  6. Abstract:
  7. see the comments at the top of path.cxx
  8. Author:
  9. Rahul Thombre (RahulTh) 3/3/2000
  10. Revision History:
  11. 3/3/2000 RahulTh Created this module.
  12. --*/
  13. #ifndef __PATH_HXX_7DD8A927_AB28_4054_BADB_53F9ED0E4A40__
  14. #define __PATH_HXX_7DD8A927_AB28_4054_BADB_53F9ED0E4A40__
  15. #define HOMEDIR_STR L"\\\\%HOMESHARE%%HOMEPATH%"
  16. #define PROFILE_STR L"%USERPROFILE%"
  17. #define USERNAME_STR L"%USERNAME%"
  18. class CRedirPath
  19. {
  20. public:
  21. CRedirPath(UINT cookie);
  22. BOOL GeneratePath (CString & szPath, const CString & szUser = USERNAME_STR) const;
  23. BOOL Load (LPCTSTR pwszPath);
  24. BOOL Load (UINT type, LPCTSTR pwszPrefix, LPCTSTR pwszSuffix);
  25. void GetPrefix (CString & szPrefix) const;
  26. void GenerateSuffix (CString & szSuffix, UINT cookie, UINT pathType) const;
  27. UINT GetType (void) const;
  28. BOOL IsPathValid (void) const;
  29. BOOL IsPathDifferent (UINT type, LPCTSTR pwszPrefix) const;
  30. // Private data members
  31. private:
  32. BOOL _bDataValid;
  33. UINT _type;
  34. CString _szPrefix;
  35. CString _szSuffix;
  36. UINT _cookie;
  37. // Private helper functions
  38. private:
  39. BOOL LoadHomedir (LPCTSTR pwszPath);
  40. BOOL LoadPerUser (LPCTSTR pwszPath);
  41. BOOL LoadUserprofile (LPCTSTR pwszPath);
  42. BOOL LoadSpecific (LPCTSTR pwszPath);
  43. };
  44. #endif // __PATH_HXX_7DD8A927_AB28_4054_BADB_53F9ED0E4A40__