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.

135 lines
3.7 KiB

  1. ////////////////////////////////////////////////////////////////////////
  2. // //
  3. // Context structure is not known to the caller. It is defined by the //
  4. // callee when Open/FindFirst is called and is used subsequently as //
  5. // input to other calls. //
  6. // //
  7. // Since the caller is not aware of the context structure the object //
  8. // manager must provide a free context funtion. //
  9. // //
  10. ////////////////////////////////////////////////////////////////////////
  11. #include "global.h"
  12. DWORD
  13. MartaAddRefFileContext(
  14. IN MARTA_CONTEXT Context
  15. );
  16. DWORD
  17. MartaCloseFileContext(
  18. IN MARTA_CONTEXT Context
  19. );
  20. ////////////////////////////////////////////////////////////////////////
  21. // Does not free up the current context. //
  22. ////////////////////////////////////////////////////////////////////////
  23. DWORD
  24. MartaFindFirstFile(
  25. IN MARTA_CONTEXT Context,
  26. IN ACCESS_MASK AccessMask,
  27. OUT PMARTA_CONTEXT pChildContext
  28. );
  29. ////////////////////////////////////////////////////////////////////////
  30. // Frees up the current context. //
  31. ////////////////////////////////////////////////////////////////////////
  32. DWORD
  33. MartaFindNextFile(
  34. IN MARTA_CONTEXT Context,
  35. IN ACCESS_MASK AccessMask,
  36. OUT PMARTA_CONTEXT pSiblingContext
  37. );
  38. ////////////////////////////////////////////////////////////////////////
  39. // Does not free up the current context. //
  40. ////////////////////////////////////////////////////////////////////////
  41. DWORD
  42. MartaGetFileParentContext(
  43. IN MARTA_CONTEXT Context,
  44. IN ACCESS_MASK AccessMask,
  45. OUT PMARTA_CONTEXT pParentContext
  46. );
  47. DWORD
  48. MartaGetFileProperties(
  49. IN MARTA_CONTEXT Context,
  50. IN OUT PMARTA_OBJECT_PROPERTIES pProperties
  51. );
  52. DWORD
  53. MartaGetFileTypeProperties(
  54. IN OUT PMARTA_OBJECT_TYPE_PROPERTIES pProperties
  55. );
  56. DWORD
  57. MartaGetFileRights(
  58. IN MARTA_CONTEXT Context,
  59. IN SECURITY_INFORMATION SecurityInfo,
  60. OUT PSECURITY_DESCRIPTOR * ppSecurityDescriptor
  61. );
  62. DWORD
  63. MartaOpenFileNamedObject(
  64. IN LPCWSTR pObjectName,
  65. IN ACCESS_MASK AccessMask,
  66. OUT PMARTA_CONTEXT pContext
  67. );
  68. DWORD
  69. MartaOpenFileHandleObject(
  70. IN HANDLE Handle,
  71. IN ACCESS_MASK AccessMask,
  72. OUT PMARTA_CONTEXT pContext
  73. );
  74. DWORD
  75. MartaSetFileRights(
  76. IN MARTA_CONTEXT Context,
  77. IN SECURITY_INFORMATION SecurityInfo,
  78. IN PSECURITY_DESCRIPTOR pSecurityDescriptor
  79. );
  80. // The following function is exported for testing
  81. DWORD
  82. MartaConvertFileContextToNtName(
  83. IN MARTA_CONTEXT Context,
  84. OUT LPWSTR *ppwszNtObject
  85. );
  86. ACCESS_MASK
  87. MartaGetFileDesiredAccess(
  88. IN SECURITY_OPEN_TYPE OpenType,
  89. IN BOOL Attribs,
  90. IN SECURITY_INFORMATION SecurityInfo
  91. );
  92. DWORD
  93. MartaReopenFileContext(
  94. IN OUT MARTA_CONTEXT Context,
  95. IN ACCESS_MASK AccessMask
  96. );
  97. DWORD
  98. MartaReopenFileOrigContext(
  99. IN OUT MARTA_CONTEXT Context,
  100. IN ACCESS_MASK AccessMask
  101. );
  102. DWORD
  103. MartaGetFileNameFromContext(
  104. IN LPWSTR DosName,
  105. IN LPWSTR NtName,
  106. IN MARTA_CONTEXT Context,
  107. OUT LPWSTR *pObjectName
  108. );
  109. DWORD
  110. MartaGetFileParentName(
  111. IN LPWSTR ObjectName,
  112. OUT LPWSTR *pParentName
  113. );