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.

89 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. context.h
  5. Abstract:
  6. This module contains the context handling routines
  7. Author:
  8. Neal Christiansen (nealch) 08-Jan-2001
  9. Revision History:
  10. --*/
  11. #ifndef _CONTEXT_H_
  12. #define _CONTEXT_H_
  13. VOID
  14. SrInitContextCtrl (
  15. IN PSR_DEVICE_EXTENSION pExtension
  16. );
  17. VOID
  18. SrCleanupContextCtrl(
  19. IN PSR_DEVICE_EXTENSION pExtension
  20. );
  21. VOID
  22. SrDeleteAllContexts(
  23. IN PSR_DEVICE_EXTENSION pExtension
  24. );
  25. VOID
  26. SrDeleteContext(
  27. IN PSR_DEVICE_EXTENSION pExtension,
  28. IN PSR_STREAM_CONTEXT pFileContext
  29. );
  30. VOID
  31. SrLinkContext(
  32. IN PSR_DEVICE_EXTENSION pExtension,
  33. IN PFILE_OBJECT pFileObject,
  34. IN OUT PSR_STREAM_CONTEXT *ppFileContext
  35. );
  36. NTSTATUS
  37. SrCreateContext (
  38. IN PSR_DEVICE_EXTENSION pExtension,
  39. IN PFILE_OBJECT pFileObject,
  40. IN SR_EVENT_TYPE EventType,
  41. IN USHORT FileAttributes,
  42. OUT PSR_STREAM_CONTEXT *pRetContext
  43. );
  44. #define SrFreeContext( pCtx ) \
  45. (ASSERT((pCtx)->UseCount == 0), \
  46. ExFreePool( (pCtx) ))
  47. NTSTATUS
  48. SrGetContext(
  49. IN PSR_DEVICE_EXTENSION pExtension,
  50. IN PFILE_OBJECT pFileObject,
  51. IN SR_EVENT_TYPE EventType,
  52. OUT PSR_STREAM_CONTEXT *pRetContext
  53. );
  54. PSR_STREAM_CONTEXT
  55. SrFindExistingContext(
  56. IN PSR_DEVICE_EXTENSION pExtension,
  57. IN PFILE_OBJECT pFileObject
  58. );
  59. VOID
  60. SrMakeContextUninteresting (
  61. IN PSR_STREAM_CONTEXT pFileContext
  62. );
  63. VOID
  64. SrReleaseContext(
  65. IN PSR_STREAM_CONTEXT pFileContext
  66. );
  67. #endif