Source code of Windows XP (NT5)
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.

42 lines
1.3 KiB

  1. // AddPrint.h: Definition of the CAddPrint class
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #ifndef _ADDPRINT_H_
  5. #define _ADDPRINT_H_
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CAddPrint
  8. class ATL_NO_VTABLE CAddPrint :
  9. public CComObjectRootEx<CComMultiThreadModel>,
  10. public CComCoClass<CAddPrint, &CLSID_AddPrint>,
  11. public COlePrnSecObject<CAddPrint>,
  12. public ISupportErrorInfoImpl<&IID_IAddPrint>,
  13. public IDispatchImpl<IAddPrint, &IID_IAddPrint, &LIBID_OLEPRNLib>
  14. {
  15. public:
  16. CAddPrint() {
  17. }
  18. BEGIN_COM_MAP(CAddPrint)
  19. COM_INTERFACE_ENTRY(IDispatch)
  20. COM_INTERFACE_ENTRY(IAddPrint)
  21. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  22. COM_INTERFACE_ENTRY_IMPL(IObjectSafety) // From COlePrnSecObject
  23. COM_INTERFACE_ENTRY_IMPL(IObjectWithSite) // From COlePrnSecObject
  24. END_COM_MAP()
  25. //DECLARE_NOT_AGGREGATABLE(CAddPrint)
  26. // Remove the comment from the line above if you don't want your object to
  27. // support aggregation.
  28. DECLARE_REGISTRY_RESOURCEID(IDR_AddPrint)
  29. // IAddPrint
  30. public:
  31. STDMETHOD(DeletePrinterConnection)(BSTR lpPrinterName);
  32. STDMETHOD(AddPrinterConnection)(BSTR lpPrinterName);
  33. private:
  34. HRESULT CanIAddPrinterConnection(void);
  35. HRESULT CanIDeletePrinterConnection(BSTR);
  36. };
  37. #endif // !defined _ADDPRINT_H_