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.

143 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. prtstrm.hxx
  5. Abstract:
  6. This module contains the declaration for the PRINT_STREAM class.
  7. The PRINT_STREAM is a class derived from STREAM that provides
  8. methods to write data to a print device.
  9. A PRINT_STREAM has always WRITE_ACCESS.
  10. Author:
  11. Jaime Sasson (jaimes) 18-Apr-1991
  12. Environment:
  13. ULIB, User Mode
  14. --*/
  15. #if !defined( _PRINT_STREAM_ )
  16. #define _PRINT_STREAM_
  17. #include "stream.hxx"
  18. //
  19. // Forward references
  20. //
  21. DECLARE_CLASS( PRINT_STREAM );
  22. DECLARE_CLASS( WSTRING );
  23. DECLARE_CLASS( PATH );
  24. class PRINT_STREAM : public STREAM {
  25. public:
  26. ULIB_EXPORT
  27. DECLARE_CONSTRUCTOR( PRINT_STREAM );
  28. DECLARE_CAST_MEMBER_FUNCTION( PRINT_STREAM );
  29. VIRTUAL
  30. ULIB_EXPORT
  31. ~PRINT_STREAM(
  32. );
  33. NONVIRTUAL
  34. ULIB_EXPORT
  35. BOOLEAN
  36. Initialize(
  37. IN PCPATH DeviceName
  38. );
  39. VIRTUAL
  40. BOOLEAN
  41. IsAtEnd(
  42. ) CONST;
  43. VIRTUAL
  44. STREAMACCESS
  45. QueryAccess(
  46. ) CONST;
  47. VIRTUAL
  48. BOOLEAN
  49. Read(
  50. OUT PBYTE Buffer,
  51. IN ULONG BytesToRead,
  52. OUT PULONG BytesRead
  53. );
  54. VIRTUAL
  55. BOOLEAN
  56. ReadChar(
  57. OUT PWCHAR Char,
  58. IN BOOLEAN Unicode DEFAULT FALSE
  59. );
  60. VIRTUAL
  61. BOOLEAN
  62. ReadMbString(
  63. IN PSTR String,
  64. IN DWORD BufferSize,
  65. INOUT PDWORD StringSize,
  66. IN PSTR Delimiters,
  67. IN BOOLEAN ExpandTabs DEFAULT FALSE,
  68. IN DWORD TabExp DEFAULT 8
  69. );
  70. VIRTUAL
  71. BOOLEAN
  72. ReadWString(
  73. IN PWSTR String,
  74. IN DWORD BufferSize,
  75. INOUT PDWORD StringSize,
  76. IN PWSTR Delimiters,
  77. IN BOOLEAN ExpandTabs DEFAULT FALSE,
  78. IN DWORD TabExp DEFAULT 8
  79. );
  80. VIRTUAL
  81. BOOLEAN
  82. ReadString(
  83. OUT PWSTRING String,
  84. IN PWSTRING Delimiters,
  85. IN BOOLEAN Unicode DEFAULT FALSE
  86. );
  87. protected:
  88. VIRTUAL
  89. HANDLE
  90. QueryHandle(
  91. ) CONST;
  92. private:
  93. NONVIRTUAL
  94. VOID
  95. Construct(
  96. );
  97. HANDLE _Handle;
  98. };
  99. #endif // _PRINT_STREAM_