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.

133 lines
2.1 KiB

  1. #ifndef _OMP_H
  2. #define _OMP_H
  3. /*++
  4. Copyright (c) 1996 Microsoft Corporation
  5. Module Name:
  6. omp.h
  7. Abstract:
  8. Private data structures and procedure prototypes for
  9. the Object Manager subcomponent of the NT Cluster
  10. Service
  11. Author:
  12. John Vert (jvert) 16-Feb-1996
  13. Revision History:
  14. --*/
  15. #define QFS_DO_NOT_UNMAP_WIN32
  16. #include "service.h"
  17. #include "sddl.h"
  18. #define LOG_CURRENT_MODULE LOG_MODULE_OM
  19. #define ENUM_GROW_SIZE 5
  20. //
  21. // Data structures for the ObjectTypes
  22. //
  23. extern POM_OBJECT_TYPE OmpObjectTypeTable[ObjectTypeMax];
  24. extern CRITICAL_SECTION OmpObjectTypeLock;
  25. //
  26. // Macros
  27. //
  28. //
  29. // Find the object type for an object
  30. //
  31. #define OmpObjectType(pObject) (((POM_HEADER)OmpObjectToHeader(pObject))->ObjectType)
  32. //
  33. // Dereference object header
  34. //
  35. #if OM_TRACE_OBJREF
  36. DWORD
  37. OmpDereferenceHeader(
  38. IN POM_HEADER Header
  39. );
  40. #else
  41. #define OmpDereferenceHeader(pOmHeader) (InterlockedDecrement(&(pOmHeader)->RefCount) == 0)
  42. #endif
  43. //
  44. // Search object list.
  45. //
  46. POM_HEADER
  47. OmpFindIdInList(
  48. IN PLIST_ENTRY ListHead,
  49. IN LPCWSTR Id
  50. );
  51. POM_HEADER
  52. OmpFindNameInList(
  53. IN PLIST_ENTRY ListHead,
  54. IN LPCWSTR Name
  55. );
  56. POM_NOTIFY_RECORD
  57. OmpFindNotifyCbInList(
  58. IN PLIST_ENTRY ListHead,
  59. IN OM_OBJECT_NOTIFYCB lpfnObjNotifyCb
  60. );
  61. //
  62. // Enumerate object list.
  63. //
  64. typedef BOOL (*OMP_ENUM_LIST_ROUTINE)(
  65. IN PVOID Context1,
  66. IN PVOID Context2,
  67. IN PVOID Object,
  68. IN LPCWSTR Name
  69. );
  70. VOID
  71. OmpEnumerateList(
  72. IN PLIST_ENTRY ListHead,
  73. IN OMP_ENUM_LIST_ROUTINE EnumerationRoutine,
  74. IN PVOID Context1,
  75. IN PVOID Context2
  76. );
  77. DWORD OmpGetCbList(
  78. IN PVOID pObject,
  79. OUT POM_NOTIFY_RECORD *ppNotifyRecList,
  80. OUT LPDWORD pdwCount
  81. );
  82. //
  83. // object logging routines
  84. //
  85. VOID
  86. OmpOpenObjectLog(
  87. VOID
  88. );
  89. VOID
  90. OmpLogPrint(
  91. LPWSTR FormatString,
  92. ...
  93. );
  94. VOID
  95. OmpLogStartRecord(
  96. VOID
  97. );
  98. VOID
  99. OmpLogStopRecord(
  100. VOID
  101. );
  102. #endif //_OMP_H