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.

109 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. faxroute.h
  5. Abstract:
  6. This file implements the faxroute interface/object.
  7. Author:
  8. Wesley Witt (wesw) 13-May-1997
  9. Environment:
  10. User Mode
  11. --*/
  12. #ifndef __FAXROUTE_H_
  13. #define __FAXROUTE_H_
  14. #include "resource.h" // main symbols
  15. #include "faxport.h"
  16. #include <winfax.h>
  17. class ATL_NO_VTABLE CFaxRoutingMethods :
  18. public CComObjectRootEx<CComSingleThreadModel>,
  19. public CComCoClass<CFaxRoutingMethods, &CLSID_FaxRoutingMethods>,
  20. public IDispatchImpl<IFaxRoutingMethods, &IID_IFaxRoutingMethods, &LIBID_FAXCOMLib>
  21. {
  22. public:
  23. CFaxRoutingMethods();
  24. ~CFaxRoutingMethods();
  25. BOOL Init(CFaxPort *pFaxPort);
  26. DECLARE_REGISTRY_RESOURCEID(IDR_FAXROUTINGMETHODS)
  27. BEGIN_COM_MAP(CFaxRoutingMethods)
  28. COM_INTERFACE_ENTRY(IFaxRoutingMethods)
  29. COM_INTERFACE_ENTRY(IDispatch)
  30. END_COM_MAP()
  31. public:
  32. STDMETHOD(get_Count)(/*[out, retval]*/ long *pVal);
  33. STDMETHOD(get_Item)(/*[in]*/ long Index, /*[out, retval]*/ VARIANT *pVal);
  34. private:
  35. DWORD m_LastFaxError;
  36. CFaxPort *m_pFaxPort;
  37. DWORD m_MethodCount;
  38. CComVariant *m_VarVect;
  39. };
  40. class ATL_NO_VTABLE CFaxRoutingMethod :
  41. public CComObjectRootEx<CComSingleThreadModel>,
  42. public CComCoClass<CFaxRoutingMethod, &CLSID_FaxRoutingMethod>,
  43. public ISupportErrorInfo,
  44. public IDispatchImpl<IFaxRoutingMethod, &IID_IFaxRoutingMethod, &LIBID_FAXCOMLib>
  45. {
  46. public:
  47. CFaxRoutingMethod();
  48. ~CFaxRoutingMethod();
  49. BOOL Initialize(CFaxPort *pFaxPort,DWORD,BOOL,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
  50. DECLARE_REGISTRY_RESOURCEID(IDR_FAXROUTINGMETHOD)
  51. DECLARE_NOT_AGGREGATABLE(CFaxRoutingMethod)
  52. BEGIN_COM_MAP(CFaxRoutingMethod)
  53. COM_INTERFACE_ENTRY(IFaxRoutingMethod)
  54. COM_INTERFACE_ENTRY(IDispatch)
  55. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  56. END_COM_MAP()
  57. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  58. public:
  59. STDMETHOD(get_RoutingData)(/*[out, retval]*/ BSTR *pVal);
  60. STDMETHOD(get_ExtensionName)(/*[out, retval]*/ BSTR *pVal);
  61. STDMETHOD(get_FriendlyName)(/*[out, retval]*/ BSTR *pVal);
  62. STDMETHOD(get_ImageName)(/*[out, retval]*/ BSTR *pVal);
  63. STDMETHOD(get_FunctionName)(/*[out, retval]*/ BSTR *pVal);
  64. STDMETHOD(get_Guid)(/*[out, retval]*/ BSTR *pVal);
  65. STDMETHOD(get_DeviceName)(/*[out, retval]*/ BSTR *pVal);
  66. STDMETHOD(get_Enable)(/*[out, retval]*/ BOOL *pVal);
  67. STDMETHOD(put_Enable)(/*[in]*/ BOOL newVal);
  68. STDMETHOD(get_DeviceId)(/*[out, retval]*/ long *pVal);
  69. private:
  70. CFaxPort *m_pFaxPort;
  71. DWORD m_LastFaxError;
  72. DWORD m_DeviceId;
  73. BOOL m_Enabled;
  74. BSTR m_DeviceName;
  75. BSTR m_Guid;
  76. BSTR m_FunctionName;
  77. BSTR m_ImageName;
  78. BSTR m_FriendlyName;
  79. BSTR m_ExtensionName;
  80. LPBYTE m_RoutingData;
  81. };
  82. #endif //__FAXROUTE_H_