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.

82 lines
2.5 KiB

  1. /******************************************************************
  2. Printer.H -- WMI provider class definition
  3. Generated by Microsoft WBEM Code Generation Engine
  4. Description:
  5. *******************************************************************/
  6. // Property set identification
  7. //============================
  8. #ifndef _Printer_H_
  9. #define _Printer_H_
  10. #define PROVIDER_NAME_PRINTER L"PCHAT_Printer"
  11. // Property name externs -- defined in Printer.cpp
  12. //=================================================
  13. extern const WCHAR *c_szDate;
  14. extern const WCHAR *c_szDefault;
  15. extern const WCHAR *c_szFilename;
  16. extern const WCHAR *c_szManufacturer;
  17. extern const WCHAR *c_szName;
  18. extern const WCHAR *c_szPath;
  19. extern const WCHAR *c_szPaused;
  20. extern const WCHAR *c_szSize;
  21. extern const WCHAR *c_szVersion;
  22. class CPrinter : public Provider
  23. {
  24. private:
  25. // member data
  26. CInstance *m_pCurrent;
  27. CInstance *m_pParamIn;
  28. CInstance *m_pParamOut;
  29. LONG m_lFlags;
  30. // member methods
  31. HRESULT GetInstanceData(IWbemClassObjectPtr pObj, CInstance *pInst);
  32. HRESULT GetStatus(void);
  33. HRESULT PrinterProperties(void);
  34. HRESULT RemovePause(void);
  35. HRESULT SetAsDefault(TCHAR *szOldDefault = NULL,
  36. DWORD cchOldDefault = 0,
  37. BOOL fSetOldDefault = FALSE);
  38. HRESULT TestPrinter(void);
  39. HRESULT EnableSpooler(void);
  40. HRESULT SetTimeouts(void);
  41. public:
  42. // Constructor/destructor
  43. //=======================
  44. CPrinter(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  45. virtual ~CPrinter();
  46. protected:
  47. // Reading Functions
  48. //============================
  49. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext,
  50. long lFlags = 0L);
  51. virtual HRESULT GetObject(CInstance* pInstance, long lFlags = 0L);
  52. virtual HRESULT ExecQuery(MethodContext *pMethodContext,
  53. CFrameworkQuery& Query, long lFlags = 0L);
  54. // Writing Functions
  55. //============================
  56. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  57. virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L);
  58. // Other Functions
  59. virtual HRESULT ExecMethod(const CInstance& Instance, const BSTR bstrMethodName,
  60. CInstance *pInParams, CInstance *pOutParams,
  61. long lFlags = 0L);
  62. };
  63. #endif