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