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.

86 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. faxtiff.h
  5. Abstract:
  6. This file contains the class definition for the faxtiff object.
  7. Author:
  8. Wesley Witt (wesw) 13-May-1997
  9. Environment:
  10. User Mode
  11. --*/
  12. #ifndef __FAXTIFF_H_
  13. #define __FAXTIFF_H_
  14. #include "resource.h" // main symbols
  15. #include "tiff.h"
  16. class ATL_NO_VTABLE CFaxTiff :
  17. public CComObjectRootEx<CComSingleThreadModel>,
  18. public CComCoClass<CFaxTiff, &CLSID_FaxTiff>,
  19. public ISupportErrorInfo,
  20. public IDispatchImpl<IFaxTiff, &IID_IFaxTiff, &LIBID_FAXCOMLib>
  21. {
  22. public:
  23. CFaxTiff();
  24. ~CFaxTiff();
  25. DECLARE_REGISTRY_RESOURCEID(IDR_FAXTIFF)
  26. BEGIN_COM_MAP(CFaxTiff)
  27. COM_INTERFACE_ENTRY(IFaxTiff)
  28. COM_INTERFACE_ENTRY(IDispatch)
  29. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  30. END_COM_MAP()
  31. // ISupportsErrorInfo
  32. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  33. // IFaxTiff
  34. public:
  35. STDMETHOD(get_Tsid)(/*[out, retval]*/ BSTR *pVal);
  36. STDMETHOD(get_Csid)(/*[out, retval]*/ BSTR *pVal);
  37. STDMETHOD(get_CallerId)(/*[out, retval]*/ BSTR *pVal);
  38. STDMETHOD(get_Routing)(/*[out, retval]*/ BSTR *pVal);
  39. STDMETHOD(get_SenderName)(/*[out, retval]*/ BSTR *pVal);
  40. STDMETHOD(get_RecipientName)(/*[out, retval]*/ BSTR *pVal);
  41. STDMETHOD(get_RecipientNumber)(/*[out, retval]*/ BSTR *pVal);
  42. STDMETHOD(get_Image)(/*[out, retval]*/ BSTR *pVal);
  43. STDMETHOD(put_Image)(/*[in]*/ BSTR newVal);
  44. STDMETHOD(get_ReceiveTime)(/*[out, retval]*/ BSTR *pVal);
  45. STDMETHOD(get_RawReceiveTime)(/*[out, retval]*/ VARIANT *pVal);
  46. STDMETHOD(get_TiffTagString)(/*[in]*/ WORD tagID, /*[out, retval]*/ BSTR* pVal);
  47. private:
  48. LPWSTR GetStringTag(WORD TagId);
  49. DWORD GetDWORDTag(WORD TagId);
  50. DWORDLONG GetQWORDTag(WORD TagId);
  51. BSTR GetString( DWORD ResId );
  52. LPWSTR AnsiStringToUnicodeString(LPSTR AnsiString);
  53. LPSTR UnicodeStringToAnsiString(LPWSTR UnicodeString);
  54. private:
  55. WCHAR TiffFileName[MAX_PATH+1];
  56. WCHAR StrBuf[128];
  57. HANDLE hFile;
  58. HANDLE hMap;
  59. LPBYTE fPtr;
  60. PTIFF_HEADER TiffHeader;
  61. DWORD NumDirEntries;
  62. UNALIGNED TIFF_TAG *TiffTags;
  63. };
  64. #endif //__FAXTIFF_H_