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.

92 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1998-2002 Microsoft Corporation
  3. Module Name:
  4. opaqueid.h
  5. Abstract:
  6. This module contains declarations for manipulating opaque IDs to
  7. kernel-mode objects.
  8. Author:
  9. Keith Moore (keithmo) 05-Aug-1998
  10. Revision History:
  11. --*/
  12. #ifndef _OPAQUEID_H_
  13. #define _OPAQUEID_H_
  14. //
  15. // Types to set opaque IDs to for tag-like free checking.
  16. //
  17. typedef enum _UL_OPAQUE_ID_TYPE
  18. {
  19. UlOpaqueIdTypeInvalid = 0,
  20. UlOpaqueIdTypeConfigGroup,
  21. UlOpaqueIdTypeHttpConnection,
  22. UlOpaqueIdTypeHttpRequest,
  23. UlOpaqueIdTypeRawConnection,
  24. UlOpaqueIdTypeMaximum
  25. } UL_OPAQUE_ID_TYPE, *PUL_OPAQUE_ID_TYPE;
  26. //
  27. // Routines invoked to manipulate the reference count of an object.
  28. //
  29. typedef
  30. VOID
  31. (*PUL_OPAQUE_ID_OBJECT_REFERENCE)(
  32. IN PVOID pObject
  33. REFERENCE_DEBUG_FORMAL_PARAMS
  34. );
  35. //
  36. // Public functions.
  37. //
  38. NTSTATUS
  39. UlInitializeOpaqueIdTable(
  40. VOID
  41. );
  42. VOID
  43. UlTerminateOpaqueIdTable(
  44. VOID
  45. );
  46. NTSTATUS
  47. UlAllocateOpaqueId(
  48. OUT PHTTP_OPAQUE_ID pOpaqueId,
  49. IN UL_OPAQUE_ID_TYPE OpaqueIdType,
  50. IN PVOID pContext
  51. );
  52. VOID
  53. UlFreeOpaqueId(
  54. IN HTTP_OPAQUE_ID OpaqueId,
  55. IN UL_OPAQUE_ID_TYPE OpaqueIdType
  56. );
  57. PVOID
  58. UlGetObjectFromOpaqueId(
  59. IN HTTP_OPAQUE_ID OpaqueId,
  60. IN UL_OPAQUE_ID_TYPE OpaqueIdType,
  61. IN PUL_OPAQUE_ID_OBJECT_REFERENCE pReferenceRoutine
  62. );
  63. #endif // _OPAQUEID_H_