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.

135 lines
2.3 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1998 - 1999
  3. All rights reserved.
  4. Module Name:
  5. PrnPrst.hxx
  6. Abstract:
  7. This class implements methods for storing , restoring printer settings into a file
  8. Also , implements read, write , seek methods to operate a file likewise a stream
  9. Author:
  10. Adina Trufinescu (AdinaTru) 4-Nov-1998
  11. Revision History:
  12. --*/
  13. //#include "prnerror.hxx"
  14. #include "PrnStrm.hxx"
  15. #ifndef _PRN_PRST_HXX_
  16. #define _PRN_PRST_HXX_
  17. #define ORPHAN
  18. class TPrinterPersist
  19. {
  20. public:
  21. TPrinterPersist::
  22. TPrinterPersist();
  23. TPrinterPersist::
  24. ~TPrinterPersist();
  25. HRESULT
  26. Read(
  27. IN OUT VOID* pv,
  28. IN ULONG cb,
  29. IN OUT ULONG* pcbRead
  30. );
  31. HRESULT
  32. Write(
  33. IN VOID const* pv,
  34. IN ULONG cb,
  35. IN OUT ULONG* pcbWritten
  36. );
  37. HRESULT
  38. Seek(
  39. IN LARGE_INTEGER dlibMove,
  40. IN DWORD dwOrigin,
  41. IN OUT ULARGE_INTEGER* plibNewPosition
  42. );
  43. HRESULT
  44. BindPrinterAndFile(
  45. IN LPCTSTR pszPrinter,
  46. IN LPCTSTR pszFile
  47. );
  48. HRESULT
  49. TPrinterPersist::
  50. UnBindPrinterAndFile(
  51. );
  52. BOOL
  53. TPrinterPersist::
  54. bGetPrinterAndFile(
  55. OUT LPCTSTR& pszPrinter,
  56. OUT LPCTSTR& pszFile
  57. );
  58. HRESULT
  59. TPrinterPersist::
  60. StorePrinterInfo(
  61. IN DWORD Flags,
  62. OUT DWORD& StoredFlags
  63. );
  64. HRESULT
  65. TPrinterPersist::
  66. RestorePrinterInfo(
  67. IN DWORD Flags,
  68. OUT DWORD& RestoredFlags
  69. );
  70. HRESULT
  71. TPrinterPersist::
  72. SafeRestorePrinterInfo(
  73. IN DWORD Flags
  74. );
  75. HRESULT
  76. TPrinterPersist::
  77. QueryPrinterInfo(
  78. IN PrinterPersistentQueryFlag Flag,
  79. OUT PersistentInfo *pPrstInfo
  80. );
  81. BOOL
  82. TPrinterPersist::
  83. bValid(
  84. VOID
  85. )
  86. {
  87. return (m_pPrnStream != NULL);
  88. };
  89. private:
  90. TPrnStream* m_pPrnStream;
  91. };
  92. #endif // end