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.

70 lines
3.2 KiB

  1. #ifndef _MIMEOLEP_H
  2. #define _MIMEOLEP_H
  3. /*
  4. * MimeOle 'P' .h ?
  5. *
  6. * what and why:
  7. * this is a private header file for exports from inetcomm.dll. Why? there are some funcitons we need to share between MimeEdit and Athena
  8. * to avoid code duplication, some of these functions require string and other resources. If we put them in msoert2.dll (the logical places)
  9. * this forces the runtime to be a resourced-dll, which means we need yet another dll - msoertres.dll or something. So this
  10. * hack of exporting them privatley from inetcomm.dll is a less complicated hack.
  11. * (sorry opie)
  12. *
  13. */
  14. #include "mimeole.h"
  15. // forward refs
  16. typedef struct tagOFNA OPENFILENAME;
  17. typedef struct tagOFNW OPENFILENAMEW;
  18. typedef struct ATTACHDATA_tag
  19. {
  20. WCHAR szTempFile[MAX_PATH], // temp file created with this attachment in it
  21. szDisplay[MAX_PATH], // the display name of the attachment as generated by MimeOle (this includes (nK))
  22. szFileName[MAX_PATH]; // the true filename of the attachment
  23. HICON hIcon; // the associated icon
  24. HANDLE hProcess; // handle to process that last opened this attachment
  25. LPSTREAM pstm; // stream to source bits
  26. HBODY hAttach; // if coming from a message, this is the handle to the body part, if it's a new attachment
  27. // this this will be null. The data can either be found in pstm, or a full path in lpszFileName
  28. BOOL fSafe; // is this file safe to open/save
  29. } ATTACHDATA, *LPATTACHDATA;
  30. enum
  31. {
  32. AV_OPEN =0,
  33. AV_SAVEAS,
  34. AV_PRINT,
  35. AV_PROPERTIES,
  36. AV_QUICKVIEW,
  37. AV_MAX
  38. };
  39. // attachment helpers
  40. MIMEOLEAPI HrDoAttachmentVerb(HWND hwnd, ULONG uVerb, IMimeMessage *pMsg, LPATTACHDATA pAttach);
  41. MIMEOLEAPI HrAttachDataFromBodyPart(IMimeMessage *pMsg, HBODY hAttach, LPATTACHDATA *ppAttach);
  42. MIMEOLEAPI HrFreeAttachData(LPATTACHDATA pAttach);
  43. MIMEOLEAPI HrGetAttachIcon(IMimeMessage *pMsg, HBODY hAttach, BOOL fLargeIcon, HICON *phIcon);
  44. MIMEOLEAPI HrSaveAttachmentAs(HWND hwnd, IMimeMessage *pMsg, LPATTACHDATA lpAttach);
  45. MIMEOLEAPI HrAttachSafetyFromBodyPart(IMimeMessage *pMsg, HBODY hAttach, BOOL *pfSafe);
  46. MIMEOLEAPI HrGetDisplayNameWithSizeForFile(LPWSTR szPathName, LPWSTR szDisplayName, int cchMaxDisplayName);
  47. MIMEOLEAPI HrAttachDataFromFile(IStream *pstm, LPWSTR szFileName, LPATTACHDATA *ppAttach);
  48. MIMEOLEAPI HrSaveAttachToFile(IMimeMessage *pMsg, HBODY hAttach, LPWSTR lpszFileName);
  49. MIMEOLEAPI HrGetAttachIconByFile(LPWSTR szFilename, BOOL fLargeIcon, HICON *phIcon);
  50. // fileopen dialog wrapper
  51. MIMEOLEAPI HrGetLastOpenFileDirectory(int cchMax, LPSTR lpsz);
  52. MIMEOLEAPI HrGetLastOpenFileDirectoryW(int cchMax, LPWSTR lpsz);
  53. MIMEOLEAPI HrAthGetFileName(OPENFILENAME *pofn, BOOL fOpen);
  54. MIMEOLEAPI HrAthGetFileNameW(OPENFILENAMEW *pofn, BOOL fOpen);
  55. // {53659CFE-AFA1-11d1-BE17-00C04FA31009}
  56. DEFINE_GUID(CMDSETID_OESecurity, 0x53659cfe, 0xafa1, 0x11d1, 0xbe, 0x17, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9);
  57. #define OECSECCMD_ENCRYPTED 1
  58. #define OECSECCMD_SIGNED 2
  59. #endif //_MIMEOLEP_H