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.

145 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. cprinter.hxx
  5. Abstract:
  6. Contains definitions for
  7. CWinNTFSPrintQueueGeneralInfo,
  8. CWinNTFSPrintQueueOperation and
  9. CWinNTPrintQueue
  10. Author:
  11. Ram Viswanathan (ramv) 11-18-95
  12. Revision History:
  13. --*/
  14. class CWinNTFSPrintQueueGeneralInfo;
  15. class CWinNTFSPrintQueueOperation;
  16. class CPropertyCache;
  17. class CWinNTPrintQueue:INHERIT_TRACKING,
  18. public ISupportErrorInfo,
  19. public IADsPrintQueue,
  20. public IADsPrintQueueOperations,
  21. public IADsPropertyList,
  22. public CCoreADsObject,
  23. public INonDelegatingUnknown,
  24. public IADsExtension
  25. {
  26. public:
  27. /* IUnknown methods */
  28. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj);
  29. STDMETHODIMP_(ULONG) AddRef(void);
  30. STDMETHODIMP_(ULONG) Release(void);
  31. // INonDelegatingUnknown methods
  32. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  33. const IID&,
  34. void **
  35. );
  36. DECLARE_NON_DELEGATING_REFCOUNTING
  37. DECLARE_IDispatch_METHODS;
  38. DECLARE_ISupportErrorInfo_METHODS;
  39. DECLARE_IADs_METHODS;
  40. DECLARE_IADsPrintQueue_METHODS;
  41. DECLARE_IADsPrintQueueOperations_METHODS;
  42. DECLARE_IADsPropertyList_METHODS;
  43. DECLARE_IADsExtension_METHODS
  44. //
  45. // constructor and destructor
  46. //
  47. CWinNTPrintQueue();
  48. ~CWinNTPrintQueue();
  49. static
  50. HRESULT
  51. CreatePrintQueue(LPTSTR lpszADsParent,
  52. DWORD dwParentId,
  53. LPTSTR pszDomainName,
  54. LPTSTR pszServerName,
  55. LPTSTR pszPrinterName,
  56. DWORD dwObjectState,
  57. REFIID riid,
  58. CWinNTCredentials& Credentials,
  59. LPVOID * ppvoid
  60. );
  61. static
  62. HRESULT
  63. CWinNTPrintQueue::AllocatePrintQueueObject(LPTSTR pszServerName,
  64. LPTSTR pszPrinterName,
  65. CWinNTPrintQueue ** ppPrintQueue
  66. );
  67. HRESULT
  68. CWinNTPrintQueue::MarshallAndSet(LPPRINTER_INFO_2 lpPrinterInfo2
  69. );
  70. HRESULT
  71. CWinNTPrintQueue::UnMarshall(LPPRINTER_INFO_2 lpPrinterInfo2,
  72. BOOL fExplicit
  73. );
  74. #if (!defined(BUILD_FOR_NT40))
  75. HRESULT
  76. CWinNTPrintQueue::MarshallAndSet(LPPRINTER_INFO_7 lpPrinterInfo7
  77. );
  78. HRESULT
  79. CWinNTPrintQueue::UnMarshall7(LPPRINTER_INFO_7 lpPrinterInfo7,
  80. BOOL fExplicit
  81. );
  82. #endif
  83. STDMETHOD(ImplicitGetInfo)(void);
  84. protected:
  85. STDMETHOD(GetInfo)(THIS_ DWORD dwApiLevel, BOOL fExplicit) ;
  86. HRESULT WinNTAddPrinter();
  87. CWinNTFSPrintQueueGeneralInfo *_pGenInfoPS;
  88. CWinNTFSPrintQueueOperation *_pOperationPS;
  89. CAggregatorDispMgr * _pDispMgr;
  90. CADsExtMgr FAR * _pExtMgr;
  91. LPWSTR _pszPrinterName; // Caches UNC name
  92. CPropertyCache * _pPropertyCache;
  93. CWinNTCredentials _Credentials;
  94. };
  95. typedef CWinNTPrintQueue *PCWinNTPrintQueue;