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.

90 lines
2.4 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. #include "faxutil.h"
  17. class ATL_NO_VTABLE CFaxTiff :
  18. public CComObjectRootEx<CComSingleThreadModel>,
  19. public CComCoClass<CFaxTiff, &CLSID_FaxTiff>,
  20. public ISupportErrorInfo,
  21. public IDispatchImpl<IFaxTiff, &IID_IFaxTiff, &LIBID_FAXCOMLib>
  22. {
  23. public:
  24. CFaxTiff();
  25. ~CFaxTiff();
  26. DECLARE_REGISTRY_RESOURCEID(IDR_FAXTIFF)
  27. BEGIN_COM_MAP(CFaxTiff)
  28. COM_INTERFACE_ENTRY(IFaxTiff)
  29. COM_INTERFACE_ENTRY(IDispatch)
  30. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  31. END_COM_MAP()
  32. // ISupportsErrorInfo
  33. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  34. // IFaxTiff
  35. public:
  36. STDMETHOD(get_Tsid)(/*[out, retval]*/ BSTR *pVal);
  37. STDMETHOD(get_Csid)(/*[out, retval]*/ BSTR *pVal);
  38. STDMETHOD(get_CallerId)(/*[out, retval]*/ BSTR *pVal);
  39. STDMETHOD(get_Routing)(/*[out, retval]*/ BSTR *pVal);
  40. STDMETHOD(get_SenderName)(/*[out, retval]*/ BSTR *pVal);
  41. STDMETHOD(get_RecipientName)(/*[out, retval]*/ BSTR *pVal);
  42. STDMETHOD(get_RecipientNumber)(/*[out, retval]*/ BSTR *pVal);
  43. STDMETHOD(get_Image)(/*[out, retval]*/ BSTR *pVal);
  44. STDMETHOD(put_Image)(/*[in]*/ BSTR newVal);
  45. STDMETHOD(get_ReceiveTime)(/*[out, retval]*/ BSTR *pVal);
  46. STDMETHOD(get_RawReceiveTime)(/*[out, retval]*/ VARIANT *pVal);
  47. STDMETHOD(get_TiffTagString)(/*[in]*/ int tagID, /*[out, retval]*/ BSTR* pVal);
  48. private:
  49. LPWSTR GetStringTag(WORD TagId);
  50. DWORD GetDWORDTag(WORD TagId);
  51. DWORDLONG GetQWORDTag(WORD TagId);
  52. BSTR GetString( LPCTSTR ResStr )
  53. {
  54. return SysAllocString(ResStr);
  55. }
  56. LPWSTR AnsiStringToUnicodeString(LPSTR AnsiString);
  57. LPSTR UnicodeStringToAnsiString(LPWSTR UnicodeString);
  58. private:
  59. WCHAR m_wszTiffFileName[MAX_PATH+1];
  60. WCHAR m_wszStrBuf[128];
  61. HANDLE m_hFile;
  62. HANDLE m_hMap;
  63. LPBYTE m_pfPtr;
  64. PTIFF_HEADER m_TiffHeader;
  65. DWORD m_dwNumDirEntries;
  66. UNALIGNED TIFF_TAG* m_TiffTags;
  67. };
  68. #endif //__FAXTIFF_H_