source: Daodan/MinGW/include/mapi.h@ 1054

Last change on this file since 1054 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 5.0 KB
Line 
1#ifndef _MAPI_H
2#define _MAPI_H
3#if __GNUC__ >=3
4#pragma GCC system_header
5#endif
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define SUCCESS_SUCCESS 0
12#define MAPI_USER_ABORT 1
13#define MAPI_E_USER_ABORT 1
14#define MAPI_E_FAILURE 2
15#define MAPI_E_LOGIN_FAILURE 3
16#define MAPI_E_LOGON_FAILURE 3
17#define MAPI_E_DISK_FULL 4
18#define MAPI_E_INSUFFICIENT_MEMORY 5
19#define MAPI_E_ACCESS_DENIED 6
20#define MAPI_E_BLK_TOO_SMALL 6
21#define MAPI_E_TOO_MANY_SESSIONS 8
22#define MAPI_E_TOO_MANY_FILES 9
23#define MAPI_E_TOO_MANY_RECIPIENTS 10
24#define MAPI_E_ATTACHMENT_NOT_FOUND 11
25#define MAPI_E_ATTACHMENT_OPEN_FAILURE 12
26#define MAPI_E_ATTACHMENT_WRITE_FAILURE 13
27#define MAPI_E_UNKNOWN_RECIPIENT 14
28#define MAPI_E_BAD_RECIPTYPE 15
29#define MAPI_E_NO_MESSAGES 16
30#define MAPI_E_INVALID_MESSAGE 17
31#define MAPI_E_TEXT_TOO_LARGE 18
32#define MAPI_E_INVALID_SESSION 19
33#define MAPI_E_TYPE_NOT_SUPPORTED 20
34#define MAPI_E_AMBIGUOUS_RECIPIENT 21
35#define MAPI_E_AMBIGUOUS_RECIP 21
36#define MAPI_E_MESSAGE_IN_USE 22
37#define MAPI_E_NETWORK_FAILURE 23
38#define MAPI_E_INVALID_EDITFIELDS 24
39#define MAPI_E_INVALID_RECIPS 25
40#define MAPI_E_NOT_SUPPORTED 26
41
42#define MAPI_ORIG 0
43#define MAPI_TO 1
44#define MAPI_CC 2
45#define MAPI_BCC 3
46
47#define MAPI_LOGON_UI 0x0001
48#define MAPI_NEW_SESSION 0x0002
49#define MAPI_FORCE_DOWNLOAD 0x1000
50#define MAPI_LOGOFF_SHARED 0x0001
51#define MAPI_LOGOFF_UI 0x0002
52#define MAPI_DIALOG 0x0008
53#define MAPI_UNREAD_ONLY 0x0020
54#define MAPI_LONG_MSGID 0x4000
55#define MAPI_GUARANTEE_FIFO 0x0100
56#define MAPI_ENVELOPE_ONLY 0x0040
57#define MAPI_PEEK 0x0080
58#define MAPI_BODY_AS_FILE 0x0200
59#define MAPI_SUPPRESS_ATTACH 0x0800
60#define MAPI_AB_NOMODIFY 0x0400
61#define MAPI_OLE 0x0001
62#define MAPI_OLE_STATIC 0x0002
63#define MAPI_UNREAD 0x0001
64#define MAPI_RECEIPT_REQUESTED 0x0002
65#define MAPI_SENT 0x0004
66
67#ifndef RC_INVOKED
68typedef unsigned long FLAGS;
69typedef unsigned long LHANDLE;
70typedef unsigned long FAR *LPLHANDLE, FAR *LPULONG;
71
72typedef struct {
73 ULONG ulReserved;
74 ULONG ulRecipClass;
75 LPSTR lpszName;
76 LPSTR lpszAddress;
77 ULONG ulEIDSize;
78 LPVOID lpEntryID;
79} MapiRecipDesc, *lpMapiRecipDesc;
80typedef struct {
81 ULONG ulReserved;
82 ULONG flFlags;
83 ULONG nPosition;
84 LPSTR lpszPathName;
85 LPSTR lpszFileName;
86 LPVOID lpFileType;
87} MapiFileDesc, *lpMapiFileDesc;
88typedef struct {
89 ULONG ulReserved;
90 ULONG cbTag;
91 LPBYTE lpTag;
92 ULONG cbEncoding;
93 LPBYTE lpEncoding;
94} MapiFileTagExt, *lpMapiFileTagExt;
95typedef struct {
96 ULONG ulReserved;
97 LPSTR lpszSubject;
98 LPSTR lpszNoteText;
99 LPSTR lpszMessageType;
100 LPSTR lpszDateReceived;
101 LPSTR lpszConversationID;
102 FLAGS flFlags;
103 lpMapiRecipDesc lpOriginator;
104 ULONG nRecipCount;
105 lpMapiRecipDesc lpRecips;
106 ULONG nFileCount;
107 lpMapiFileDesc lpFiles;
108} MapiMessage, *lpMapiMessage;
109
110ULONG PASCAL MAPILogon (ULONG,LPSTR,LPSTR,FLAGS,ULONG,LPLHANDLE);
111ULONG PASCAL MAPISendMail (LHANDLE,ULONG,lpMapiMessage,FLAGS,ULONG);
112ULONG PASCAL MAPISendDocuments (ULONG,LPSTR,LPSTR,LPSTR,ULONG);
113ULONG PASCAL MAPIReadMail (LHANDLE,ULONG,LPSTR,FLAGS,ULONG,
114 lpMapiMessage*);
115ULONG PASCAL MAPIFindNext (LHANDLE,ULONG,LPSTR,LPSTR,FLAGS,ULONG,LPSTR);
116ULONG PASCAL MAPIResolveName (LHANDLE,ULONG,LPSTR,FLAGS,ULONG,
117 lpMapiRecipDesc*);
118ULONG PASCAL MAPIAddress (LHANDLE,ULONG,LPSTR,ULONG,LPSTR,ULONG,
119 lpMapiRecipDesc,FLAGS,ULONG,LPULONG,
120 lpMapiRecipDesc*);
121ULONG PASCAL MAPIFreeBuffer (LPVOID);
122ULONG PASCAL MAPIDetails (LHANDLE,ULONG,lpMapiRecipDesc,FLAGS,ULONG);
123ULONG PASCAL MAPISaveMail (LHANDLE,ULONG,lpMapiMessage lpszMessage,
124 FLAGS,ULONG,LPSTR);
125ULONG PASCAL MAPIDeleteMail (LHANDLE lpSession,ULONG,LPSTR,FLAGS,ULONG);
126ULONG PASCAL MAPILogoff (LHANDLE,ULONG,FLAGS,ULONG);
127/* Netscape extensions. */
128ULONG PASCAL MAPIGetNetscapeVersion (void);
129ULONG PASCAL MAPI_NSCP_SynchronizeClient (LHANDLE,ULONG);
130
131/* Handles for use with GetProcAddress */
132typedef ULONG (PASCAL * LPMAPILOGON) (ULONG,LPSTR,LPSTR,FLAGS,ULONG,
133 LPLHANDLE);
134typedef ULONG (PASCAL * LPMAPISENDMAIL) (LHANDLE,ULONG,lpMapiMessage,
135 FLAGS,ULONG);
136typedef ULONG (PASCAL * LPMAPISENDDOCUMENTS) (ULONG,LPSTR,LPSTR,
137 LPSTR,ULONG);
138typedef ULONG (PASCAL * LPMAPIREADMAIL) (LHANDLE,ULONG,LPSTR,FLAGS,
139 ULONG,lpMapiMessage*);
140typedef ULONG (PASCAL * LPMAPIFINDNEXT) (LHANDLE,ULONG,LPSTR,LPSTR,
141 FLAGS,ULONG,LPSTR);
142typedef ULONG (PASCAL * LPMAPIRESOLVENAME) (LHANDLE,ULONG,LPSTR,FLAGS,
143 ULONG,lpMapiRecipDesc*);
144typedef ULONG (PASCAL * LPMAPIADDRESS) (LHANDLE,ULONG,LPSTR,ULONG,LPSTR,
145 ULONG,lpMapiRecipDesc,FLAGS,ULONG,
146 LPULONG,lpMapiRecipDesc*);
147typedef ULONG (PASCAL * LPMAPIFREEBUFFER) (LPVOID lpv);
148typedef ULONG (PASCAL * LPMAPIDETAILS) (LHANDLE,ULONG,lpMapiRecipDesc,
149 FLAGS,ULONG);
150typedef ULONG (PASCAL * LPMAPISAVEMAIL) (LHANDLE,ULONG,lpMapiMessage,
151 FLAGS,ULONG,LPSTR);
152typedef ULONG (PASCAL * LPMAPIDELETEMAIL) (LHANDLE lpSession,ULONG,
153 LPSTR, FLAGS,ULONG);
154typedef ULONG (PASCAL * LPMAPILOGOFF)(LHANDLE,ULONG,FLAGS,ULONG);
155
156#endif /* RC_INVOKED */
157
158#ifdef __cplusplus
159}
160#endif
161
162#endif /* Not _MAPI_H */
163
Note: See TracBrowser for help on using the repository browser.