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.

130 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. cjob.hxx
  5. Abstract:
  6. Contains definitions for
  7. CWinNTPrintJob
  8. Author:
  9. Ram Viswanathan (ramv) 11-18-95
  10. Revision History:
  11. --*/
  12. #define MAX_LONG_LENGTH 15
  13. class CPropertyCache;
  14. class CWinNTPrintJob: INHERIT_TRACKING,
  15. public ISupportErrorInfo,
  16. public IADsPrintJob,
  17. public IADsPrintJobOperations,
  18. public IADsPropertyList,
  19. public CCoreADsObject,
  20. public INonDelegatingUnknown,
  21. public IADsExtension
  22. {
  23. public:
  24. /* IUnknown methods */
  25. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  26. STDMETHODIMP_(ULONG) AddRef(void);
  27. STDMETHODIMP_(ULONG) Release(void);
  28. // INonDelegatingUnknown methods
  29. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  30. const IID&,
  31. void **
  32. );
  33. DECLARE_NON_DELEGATING_REFCOUNTING
  34. DECLARE_IDispatch_METHODS;
  35. DECLARE_ISupportErrorInfo_METHODS;
  36. DECLARE_IADs_METHODS;
  37. DECLARE_IADsPrintJob_METHODS;
  38. DECLARE_IADsPrintJobOperations_METHODS;
  39. DECLARE_IADsPropertyList_METHODS;
  40. DECLARE_IADsExtension_METHODS;
  41. //
  42. // constructor and destructor
  43. //
  44. CWinNTPrintJob::CWinNTPrintJob();
  45. CWinNTPrintJob::~CWinNTPrintJob();
  46. static
  47. HRESULT
  48. CreatePrintJob(
  49. LPTSTR pszPrinterPath,
  50. LONG lJobId,
  51. DWORD dwObjectState,
  52. REFIID riid,
  53. CWinNTCredentials& Credentials,
  54. LPVOID *ppvoid
  55. );
  56. static
  57. HRESULT
  58. CWinNTPrintJob::AllocatePrintJobObject(
  59. LPTSTR pszPrinterPath,
  60. CWinNTPrintJob ** ppPrintJob
  61. );
  62. HRESULT
  63. MarshallAndSet(
  64. LPJOB_INFO_2 lpJobInfo2,
  65. LPWSTR pszPrinterName,
  66. LONG lJobId
  67. );
  68. HRESULT
  69. UnMarshallLevel2(
  70. LPJOB_INFO_2 lpJobInfo2,
  71. BOOL fExplicit
  72. );
  73. HRESULT
  74. UnMarshallLevel1(
  75. LPJOB_INFO_1 lpJobInfo1,
  76. BOOL fExplicit
  77. );
  78. STDMETHOD(ImplicitGetInfo)(void);
  79. protected:
  80. STDMETHOD(GetInfo)(THIS_ DWORD dwApiLevel, BOOL fExplicit);
  81. CAggregatorDispMgr * _pDispMgr;
  82. CADsExtMgr FAR * _pExtMgr;
  83. HANDLE _hprinter;
  84. LONG _lJobId;
  85. LPWSTR _pszPrinterName;
  86. LPWSTR _pszPrinterPath;
  87. CPropertyCache * _pPropertyCache;
  88. CWinNTCredentials _Credentials;
  89. };