mapi: Add some missing MAPI prototypes.
Add some missing MAPI prototypes to mapi.h (spotted by winapi_check) and include it where they are implemented. Make mapi.h and mapix.h compatible. gcc does not like macros and prototypes to be redefined so this involved protecting against multiple definitions. Fix the MAPISendMail() implementation prototype.
This commit is contained in:
parent
805dc74809
commit
4db07ab496
|
@ -25,6 +25,7 @@
|
|||
#include "winerror.h"
|
||||
#include "objbase.h"
|
||||
#include "mapix.h"
|
||||
#include "mapi.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mapi);
|
||||
|
|
|
@ -56,7 +56,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mapi);
|
|||
* NOTES
|
||||
* This is a temporary hack.
|
||||
*/
|
||||
ULONG WINAPI MAPISendMail( LHANDLE session, ULONG uiparam,
|
||||
ULONG WINAPI MAPISendMail( LHANDLE session, ULONG_PTR uiparam,
|
||||
lpMapiMessage message, FLAGS flags, ULONG reserved )
|
||||
{
|
||||
ULONG ret = MAPI_E_FAILURE;
|
||||
|
|
|
@ -31,7 +31,11 @@ typedef unsigned long LHANDLE, *LPLHANDLE;
|
|||
#endif
|
||||
#define lhSessionNull ((LHANDLE)0)
|
||||
|
||||
#ifndef WINE_FLAGS_DEFINED
|
||||
#define WINE_FLAGS_DEFINED
|
||||
typedef unsigned long FLAGS;
|
||||
#endif
|
||||
typedef unsigned long* LPULONG;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -79,7 +83,10 @@ typedef struct
|
|||
|
||||
/* Error codes */
|
||||
|
||||
#define SUCCESS_SUCCESS 0
|
||||
#ifndef SUCCESS_SUCCESS
|
||||
#define SUCCESS_SUCCESS 0L
|
||||
#endif
|
||||
|
||||
#define MAPI_USER_ABORT 1
|
||||
#define MAPI_E_USER_ABORT MAPI_USER_ABORT
|
||||
#define MAPI_E_FAILURE 2
|
||||
|
@ -112,11 +119,21 @@ typedef struct
|
|||
|
||||
/* MAPILogon */
|
||||
|
||||
#ifndef MAPI_LOGON_UI
|
||||
#define MAPI_LOGON_UI 0x00000001
|
||||
#define MAPI_PASSWORD_UI 0x00020000
|
||||
#endif
|
||||
#ifndef MAPI_NEW_SESSION
|
||||
#define MAPI_NEW_SESSION 0x00000002
|
||||
#define MAPI_FORCE_DOWNLOAD 0x00001000
|
||||
#endif
|
||||
#ifndef MAPI_EXTENDED
|
||||
#define MAPI_EXTENDED 0x00000020
|
||||
#endif
|
||||
#ifndef MAPI_FORCE_DOWNLOAD
|
||||
#define MAPI_FORCE_DOWNLOAD 0x00001000
|
||||
#endif
|
||||
#ifndef MAPI_PASSWORD_UI
|
||||
#define MAPI_PASSWORD_UI 0x00020000
|
||||
#endif
|
||||
|
||||
|
||||
/* MAPISendMail */
|
||||
|
@ -124,6 +141,59 @@ typedef struct
|
|||
#define MAPI_DIALOG 0x00000008
|
||||
|
||||
|
||||
/* API typedefs and prototypes */
|
||||
|
||||
typedef ULONG (WINAPI MAPIADDRESS)(LHANDLE,ULONG_PTR,LPSTR,ULONG,LPSTR,ULONG,lpMapiRecipDesc,FLAGS,ULONG,LPULONG,lpMapiRecipDesc*);
|
||||
typedef MAPIADDRESS *LPMAPIADDRESS;
|
||||
MAPIADDRESS MAPIAddress;
|
||||
|
||||
typedef ULONG (WINAPI MAPIDELETEMAIL)(LHANDLE,ULONG_PTR,LPSTR,FLAGS,ULONG);
|
||||
typedef MAPIDELETEMAIL *LPMAPIDELETEMAIL;
|
||||
MAPIDELETEMAIL MAPIDeleteMail;
|
||||
|
||||
typedef ULONG (WINAPI MAPIDETAILS)(LHANDLE,ULONG_PTR,lpMapiRecipDesc,FLAGS,ULONG);
|
||||
typedef MAPIDETAILS *LPMAPIDETAILS;
|
||||
MAPIDETAILS MAPIDetails;
|
||||
|
||||
typedef ULONG (WINAPI MAPIFINDNEXT)(LHANDLE,ULONG_PTR,LPSTR,LPSTR,FLAGS,ULONG,LPSTR);
|
||||
typedef MAPIFINDNEXT *LPMAPIFINDNEXT;
|
||||
MAPIFINDNEXT MAPIFindNext;
|
||||
|
||||
#ifndef MAPIFREEBUFFER_DEFINED
|
||||
#define MAPIFREEBUFFER_DEFINED
|
||||
typedef ULONG (WINAPI MAPIFREEBUFFER)(LPVOID);
|
||||
typedef MAPIFREEBUFFER *LPMAPIFREEBUFFER;
|
||||
MAPIFREEBUFFER MAPIFreeBuffer;
|
||||
#endif
|
||||
|
||||
typedef ULONG (WINAPI MAPILOGOFF)(LHANDLE,ULONG_PTR,FLAGS,ULONG);
|
||||
typedef MAPILOGOFF *LPMAPILOGOFF;
|
||||
MAPILOGOFF MAPILogoff;
|
||||
|
||||
typedef ULONG (WINAPI MAPILOGON)(ULONG_PTR,LPSTR,LPSTR,FLAGS,ULONG,LPLHANDLE);
|
||||
typedef MAPILOGON *LPMAPILOGON;
|
||||
MAPILOGON MAPILogon;
|
||||
|
||||
typedef ULONG (WINAPI MAPIREADMAIL)(LHANDLE,ULONG_PTR,LPSTR,FLAGS,ULONG,lpMapiMessage);
|
||||
typedef MAPIREADMAIL *LPMAPIREADMAIL;
|
||||
MAPIREADMAIL MAPIReadMail;
|
||||
|
||||
typedef ULONG (WINAPI MAPIRESOLVENAME)(LHANDLE,ULONG_PTR,LPSTR,FLAGS,ULONG,lpMapiRecipDesc*);
|
||||
typedef MAPIRESOLVENAME *LPMAPIRESOLVENAME;
|
||||
MAPIRESOLVENAME MAPIResolveName;
|
||||
|
||||
typedef ULONG (WINAPI MAPISAVEMAIL)(LHANDLE,ULONG_PTR,lpMapiMessage,FLAGS,ULONG,LPSTR);
|
||||
typedef MAPISAVEMAIL *LPMAPISAVEMAIL;
|
||||
MAPISAVEMAIL MAPISaveMail;
|
||||
|
||||
typedef ULONG (WINAPI MAPISENDDOCUMENTS)(ULONG_PTR,LPSTR,LPSTR,LPSTR,ULONG);
|
||||
typedef MAPISENDDOCUMENTS *LPMAPISENDDOCUMENTS;
|
||||
MAPISENDDOCUMENTS MAPISendDocuments;
|
||||
|
||||
typedef ULONG (WINAPI MAPISENDMAIL)(LHANDLE,ULONG_PTR,lpMapiMessage,FLAGS,ULONG);
|
||||
typedef MAPISENDMAIL *LPMAPI;
|
||||
MAPISENDMAIL MAPISendMail;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -42,20 +42,33 @@ typedef struct IMsgServiceAdmin IMsgServiceAdmin;
|
|||
typedef IMsgServiceAdmin *LPSERVICEADMIN;
|
||||
typedef struct IMAPISession *LPMAPISESSION;
|
||||
|
||||
typedef unsigned long FLAGS;
|
||||
#ifndef WINE_FLAGS_DEFINED
|
||||
#define WINE_FLAGS_DEFINED
|
||||
typedef unsigned long FLAGS;
|
||||
#endif
|
||||
|
||||
/* Flags for MAPILogon and MAPILogonEx */
|
||||
#define MAPI_LOGON_UI 0x000001
|
||||
#define MAPI_NEW_SESSION 0x000002
|
||||
#define MAPI_EXTENDED 0x000020
|
||||
#define MAPI_FORCE_DOWNLOAD 0x001000
|
||||
#define MAPI_PASSWORD_UI 0x020000
|
||||
#define MAPI_ALLOW_OTHERS 0x000008
|
||||
#define MAPI_EXPLICIT_PROFILE 0x000010
|
||||
#define MAPI_SERVICE_UI_ALWAYS 0x002000
|
||||
#define MAPI_NO_MAIL 0x008000
|
||||
#define MAPI_NT_SERVICE 0x010000
|
||||
#define MAPI_TIMEOUT_SHORT 0x100000
|
||||
#ifndef MAPI_LOGON_UI
|
||||
#define MAPI_LOGON_UI 0x00000001
|
||||
#endif
|
||||
#ifndef MAPI_NEW_SESSION
|
||||
#define MAPI_NEW_SESSION 0x00000002
|
||||
#endif
|
||||
#define MAPI_ALLOW_OTHERS 0x00000008
|
||||
#define MAPI_EXPLICIT_PROFILE 0x00000010
|
||||
#ifndef MAPI_EXTENDED
|
||||
#define MAPI_EXTENDED 0x00000020
|
||||
#endif
|
||||
#ifndef MAPI_FORCE_DOWNLOAD
|
||||
#define MAPI_FORCE_DOWNLOAD 0x00001000
|
||||
#endif
|
||||
#ifndef MAPI_PASSWORD_UI
|
||||
#define MAPI_PASSWORD_UI 0x00020000
|
||||
#endif
|
||||
#define MAPI_SERVICE_UI_ALWAYS 0x00002000
|
||||
#define MAPI_NO_MAIL 0x00008000
|
||||
#define MAPI_NT_SERVICE 0x00010000
|
||||
#define MAPI_TIMEOUT_SHORT 0x00100000
|
||||
|
||||
#define MAPI_SIMPLE_DEFAULT (MAPI_LOGON_UI|MAPI_ALLOW_OTHERS|MAPI_FORCE_DOWNLOAD)
|
||||
#define MAPI_SIMPLE_EXPLICIT (MAPI_NEW_SESSION|MAPI_EXPLICIT_PROFILE|MAPI_FORCE_DOWNLOAD)
|
||||
|
@ -94,9 +107,12 @@ typedef SCODE (WINAPI MAPIALLOCATEMORE)(ULONG,LPVOID,LPVOID*);
|
|||
typedef MAPIALLOCATEMORE *LPMAPIALLOCATEMORE;
|
||||
MAPIALLOCATEMORE MAPIAllocateMore;
|
||||
|
||||
#ifndef MAPIFREEBUFFER_DEFINED
|
||||
#define MAPIFREEBUFFER_DEFINED
|
||||
typedef ULONG (WINAPI MAPIFREEBUFFER)(LPVOID);
|
||||
typedef MAPIFREEBUFFER *LPMAPIFREEBUFFER;
|
||||
MAPIFREEBUFFER MAPIFreeBuffer;
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* IMAPISession interface
|
||||
|
|
Loading…
Reference in New Issue