From bae9e56ef4f453f96c677f0a9d14c0e74a13ba04 Mon Sep 17 00:00:00 2001 From: Owen Rudge Date: Fri, 18 Sep 2009 15:15:53 +0100 Subject: [PATCH] mapi32: Implement the rest of the Simple MAPI functions. --- dlls/mapi32/mapi32.spec | 16 ++++++------ dlls/mapi32/mapi32_main.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/mapi32/sendmail.c | 9 +++++++ 3 files changed, 82 insertions(+), 8 deletions(-) diff --git a/dlls/mapi32/mapi32.spec b/dlls/mapi32/mapi32.spec index abf79bf124a..04be363d2bc 100644 --- a/dlls/mapi32/mapi32.spec +++ b/dlls/mapi32/mapi32.spec @@ -145,17 +145,17 @@ 205 stub FDecodeID@12 206 stub CchOfEncoding@4 207 stdcall CbOfEncoded@4(ptr) CbOfEncoded -208 stub MAPISendDocuments +208 stdcall MAPISendDocuments(ptr ptr ptr ptr long) 209 stdcall MAPILogon(long ptr ptr long long ptr) 210 stdcall MAPILogoff(long long long long) 211 stdcall MAPISendMail(long long ptr long long) -212 stub MAPISaveMail -213 stub MAPIReadMail -214 stub MAPIFindNext -215 stub MAPIDeleteMail -217 stub MAPIAddress -218 stub MAPIDetails -219 stub MAPIResolveName +212 stdcall MAPISaveMail(ptr ptr ptr long long ptr) +213 stdcall MAPIReadMail(ptr ptr ptr long long ptr) +214 stdcall MAPIFindNext(ptr ptr ptr ptr long long ptr) +215 stdcall MAPIDeleteMail(ptr ptr ptr long long) +217 stdcall MAPIAddress(ptr ptr ptr long ptr long long ptr long ptr ptr) +218 stdcall MAPIDetails(ptr ptr ptr long long) +219 stdcall MAPIResolveName(ptr ptr ptr long long ptr) 220 stub BMAPISendMail 221 stub BMAPISaveMail 222 stub BMAPIReadMail diff --git a/dlls/mapi32/mapi32_main.c b/dlls/mapi32/mapi32_main.c index 5b6e6e52845..5039c292707 100644 --- a/dlls/mapi32/mapi32_main.c +++ b/dlls/mapi32/mapi32_main.c @@ -184,3 +184,68 @@ HRESULT WINAPI MAPIAdminProfiles(ULONG ulFlags, LPPROFADMIN *lppProfAdmin) *lppProfAdmin = NULL; return E_FAIL; } + +ULONG WINAPI MAPIAddress(LHANDLE session, ULONG_PTR uiparam, LPSTR caption, + ULONG editfields, LPSTR labels, ULONG nRecips, lpMapiRecipDesc lpRecips, + FLAGS flags, ULONG reserved, LPULONG newRecips, lpMapiRecipDesc * lppNewRecips) +{ + if (mapiFunctions.MAPIAddress) + return mapiFunctions.MAPIAddress(session, uiparam, caption, editfields, labels, + nRecips, lpRecips, flags, reserved, newRecips, lppNewRecips); + + return MAPI_E_NOT_SUPPORTED; +} + +ULONG WINAPI MAPIDeleteMail(LHANDLE session, ULONG_PTR uiparam, LPSTR msg_id, + FLAGS flags, ULONG reserved) +{ + if (mapiFunctions.MAPIDeleteMail) + return mapiFunctions.MAPIDeleteMail(session, uiparam, msg_id, flags, reserved); + + return MAPI_E_NOT_SUPPORTED; +} + +ULONG WINAPI MAPIDetails(LHANDLE session, ULONG_PTR uiparam, lpMapiRecipDesc recip, + FLAGS flags, ULONG reserved) +{ + if (mapiFunctions.MAPIDetails) + return mapiFunctions.MAPIDetails(session, uiparam, recip, flags, reserved); + + return MAPI_E_NOT_SUPPORTED; +} + +ULONG WINAPI MAPIFindNext(LHANDLE session, ULONG_PTR uiparam, LPSTR msg_type, + LPSTR seed_msg_id, FLAGS flags, ULONG reserved, LPSTR msg_id) +{ + if (mapiFunctions.MAPIFindNext) + return mapiFunctions.MAPIFindNext(session, uiparam, msg_type, seed_msg_id, flags, reserved, msg_id); + + return MAPI_E_NOT_SUPPORTED; +} + +ULONG WINAPI MAPIReadMail(LHANDLE session, ULONG_PTR uiparam, LPSTR msg_id, + FLAGS flags, ULONG reserved, lpMapiMessage msg) +{ + if (mapiFunctions.MAPIReadMail) + return mapiFunctions.MAPIReadMail(session, uiparam, msg_id, flags, reserved, msg); + + return MAPI_E_NOT_SUPPORTED; +} + +ULONG WINAPI MAPIResolveName(LHANDLE session, ULONG_PTR uiparam, LPSTR name, + FLAGS flags, ULONG reserved, lpMapiRecipDesc *recip) +{ + if (mapiFunctions.MAPIResolveName) + return mapiFunctions.MAPIResolveName(session, uiparam, name, flags, reserved, recip); + + return MAPI_E_NOT_SUPPORTED; +} + +ULONG WINAPI MAPISaveMail(LHANDLE session, ULONG_PTR uiparam, lpMapiMessage msg, + FLAGS flags, ULONG reserved, LPSTR msg_id) +{ + if (mapiFunctions.MAPISaveMail) + return mapiFunctions.MAPISaveMail(session, uiparam, msg, flags, reserved, msg_id); + + return MAPI_E_NOT_SUPPORTED; +} diff --git a/dlls/mapi32/sendmail.c b/dlls/mapi32/sendmail.c index 7cf8ec8db8e..5054be80f61 100644 --- a/dlls/mapi32/sendmail.c +++ b/dlls/mapi32/sendmail.c @@ -211,3 +211,12 @@ exit: return ret; } + +ULONG WINAPI MAPISendDocuments(ULONG_PTR uiparam, LPSTR delim, LPSTR paths, + LPSTR filenames, ULONG reserved) +{ + if (mapiFunctions.MAPISendDocuments) + return mapiFunctions.MAPISendDocuments(uiparam, delim, paths, filenames, reserved); + + return MAPI_E_NOT_SUPPORTED; +} -- 2.11.4.GIT