/****************************************************************** Printer.H -- WMI provider class definition Generated by Microsoft WBEM Code Generation Engine Description: *******************************************************************/ // Property set identification //============================ #ifndef _Printer_H_ #define _Printer_H_ #define PROVIDER_NAME_PRINTER L"PCHAT_Printer" // Property name externs -- defined in Printer.cpp //================================================= extern const WCHAR *c_szDate; extern const WCHAR *c_szDefault; extern const WCHAR *c_szFilename; extern const WCHAR *c_szManufacturer; extern const WCHAR *c_szName; extern const WCHAR *c_szPath; extern const WCHAR *c_szPaused; extern const WCHAR *c_szSize; extern const WCHAR *c_szVersion; class CPrinter : public Provider { private: // member data CInstance *m_pCurrent; CInstance *m_pParamIn; CInstance *m_pParamOut; LONG m_lFlags; // member methods HRESULT GetInstanceData(IWbemClassObjectPtr pObj, CInstance *pInst); HRESULT GetStatus(void); HRESULT PrinterProperties(void); HRESULT RemovePause(void); HRESULT SetAsDefault(TCHAR *szOldDefault = NULL, DWORD cchOldDefault = 0, BOOL fSetOldDefault = FALSE); HRESULT TestPrinter(void); HRESULT EnableSpooler(void); HRESULT SetTimeouts(void); public: // Constructor/destructor //======================= CPrinter(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace); virtual ~CPrinter(); protected: // Reading Functions //============================ virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L); virtual HRESULT GetObject(CInstance* pInstance, long lFlags = 0L); virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L); // Writing Functions //============================ virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L); virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L); // Other Functions virtual HRESULT ExecMethod(const CInstance& Instance, const BSTR bstrMethodName, CInstance *pInParams, CInstance *pOutParams, long lFlags = 0L); }; #endif