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.

112 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. pipestr.hxx
  5. Abstract:
  6. This module contains the declaration for the PIPE_STREAM class.
  7. The PIPE_STREAM is a class derived from BUFFER_STREAM that provides
  8. methods to read and write data to an anonymous pipe.
  9. A PIPE_STREAM will have one of the following access: READ or WRITE.
  10. Author:
  11. Jaime Sasson (jaimes) 18-Apr-1991
  12. Environment:
  13. ULIB, User Mode
  14. --*/
  15. #if !defined( PIPE_STREAM_ )
  16. #define PIPE_STREAM_
  17. #include "bufstrm.hxx"
  18. //
  19. // Forward references
  20. //
  21. DECLARE_CLASS( PIPE_STREAM );
  22. DECLARE_CLASS( WSTRING );
  23. class PIPE_STREAM : public BUFFER_STREAM {
  24. public:
  25. friend class PIPE;
  26. friend PSTREAM GetStandardStream( HANDLE, STREAMACCESS );
  27. DECLARE_CAST_MEMBER_FUNCTION( PIPE_STREAM );
  28. VIRTUAL
  29. ~PIPE_STREAM(
  30. );
  31. VIRTUAL
  32. STREAMACCESS
  33. QueryAccess(
  34. ) CONST;
  35. protected:
  36. DECLARE_CONSTRUCTOR( PIPE_STREAM );
  37. NONVIRTUAL
  38. BOOLEAN
  39. Initialize(
  40. IN HANDLE Handle,
  41. IN STREAMACCESS Access
  42. );
  43. VIRTUAL
  44. BOOLEAN
  45. EndOfFile(
  46. ) CONST;
  47. VIRTUAL
  48. BOOLEAN
  49. FillBuffer(
  50. IN PBYTE Buffer,
  51. IN ULONG BufferSize,
  52. OUT PULONG BytesRead
  53. );
  54. VIRTUAL
  55. HANDLE
  56. QueryHandle(
  57. ) CONST;
  58. #ifdef FE_SB
  59. VIRTUAL
  60. BOOLEAN
  61. CheckIfLeadByte(
  62. IN PUCHAR text,
  63. IN ULONG offset
  64. );
  65. #endif
  66. private:
  67. HANDLE _PipeHandle;
  68. STREAMACCESS _Access;
  69. BOOLEAN _EndOfFile;
  70. };
  71. #endif // _PIPE_STREAM_