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.

106 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name :
  4. tsvroot.hxx
  5. Abstract:
  6. Define the per instance virtual root class.
  7. Author:
  8. Johnson Apacible (JohnsonA) June-27-1996
  9. --*/
  10. #ifndef _TSVROOT_HXX_
  11. #define _TSVROOT_HXX_
  12. #include <fsconst.h>
  13. #include <lkrhash.h>
  14. //
  15. // per instance virtual root table
  16. //
  17. class dllexp IIS_VROOT_TABLE:
  18. private CLKRHashTable
  19. {
  20. public:
  21. IIS_VROOT_TABLE( VOID );
  22. ~IIS_VROOT_TABLE( VOID );
  23. BOOL LookupVirtualRoot(
  24. IN const CHAR * pszRoot,
  25. OUT CHAR * pszDirectory,
  26. IN OUT LPDWORD lpcbSize,
  27. OUT LPDWORD lpdwAccessMask = NULL,
  28. OUT LPDWORD pcchDirRoot = NULL,
  29. OUT LPDWORD pcchVroot = NULL,
  30. OUT PHANDLE phImpersonationToken = NULL,
  31. OUT LPDWORD lpdwFileSystem = NULL
  32. );
  33. BOOL RemoveVirtualRoots( VOID );
  34. BOOL AddVirtualRoot(
  35. IN PCHAR pszRoot,
  36. IN PCHAR pszDirectory,
  37. IN DWORD dwAccessMask,
  38. IN PCHAR pszAccountName = NULL,
  39. IN HANDLE hImpersonation = NULL,
  40. IN DWORD dwFileSystem = FS_FAT,
  41. IN BOOL fDoCache = TRUE
  42. );
  43. BOOL RemoveVirtualRoot(
  44. IN PCHAR pszVirtPath
  45. );
  46. DWORD QueryVrootCount( VOID ) {return m_nVroots;}
  47. VOID LockShared() { m_tsTableLock.Lock(TSRES_LOCK_READ); }
  48. VOID LockExclusive() { m_tsTableLock.Lock(TSRES_LOCK_WRITE); }
  49. VOID LockConvertExclusive() { m_tsTableLock.Convert(TSRES_CONV_WRITE); }
  50. VOID Unlock() { m_tsTableLock.Unlock(); }
  51. private:
  52. //
  53. // Number of vroots
  54. //
  55. DWORD m_nVroots;
  56. TS_RESOURCE m_tsTableLock;
  57. VOID DeleteVRootEntry(
  58. IN PVOID pEntry
  59. );
  60. static const DWORD_PTR
  61. ExtractKey(const void* pvRecord);
  62. static DWORD
  63. CalcKeyHash(const DWORD_PTR pnKey);
  64. static bool
  65. EqualKeys(const DWORD_PTR pnKey1, const DWORD_PTR pnKey2);
  66. static void
  67. AddRefRecord(const void* pvRecord, int nIncr)
  68. {}
  69. };
  70. typedef IIS_VROOT_TABLE *PIIS_VROOT_TABLE;
  71. #endif // _TSVROOT_HXX_