Owen Rudge : mapi32: Implement MAPIInitialize, Logon, Logoff, LogonEx, Uninitialize.
Alexandre Julliard
julliard at winehq.org
Fri Sep 18 13:37:40 CDT 2009
Module: wine
Branch: master
Commit: 421ab509fc3c647a64c3e16cf9431f452fda5e2b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=421ab509fc3c647a64c3e16cf9431f452fda5e2b
Author: Owen Rudge <orudge at codeweavers.com>
Date: Fri Sep 18 15:15:45 2009 +0100
mapi32: Implement MAPIInitialize, Logon, Logoff, LogonEx, Uninitialize.
---
dlls/mapi32/mapi32_main.c | 66 ++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 59 insertions(+), 7 deletions(-)
diff --git a/dlls/mapi32/mapi32_main.c b/dlls/mapi32/mapi32_main.c
index 0f82e76..5b6e6e5 100644
--- a/dlls/mapi32/mapi32_main.c
+++ b/dlls/mapi32/mapi32_main.c
@@ -83,36 +83,77 @@ HRESULT WINAPI DllCanUnloadNow(void)
return MAPI_ObjectCount == 0 ? S_OK : S_FALSE;
}
+/***********************************************************************
+ * MAPIInitialize
+ *
+ * Initialises the MAPI library. In our case, we pass through to the
+ * loaded Extended MAPI provider.
+ */
HRESULT WINAPI MAPIInitialize(LPVOID init)
{
- FIXME("(%p) Stub\n", init);
- return SUCCESS_SUCCESS;
+ TRACE("(%p)\n", init);
+
+ if (mapiFunctions.MAPIInitialize)
+ return mapiFunctions.MAPIInitialize(init);
+
+ return MAPI_E_NOT_INITIALIZED;
}
+/***********************************************************************
+ * MAPILogon
+ *
+ * Logs on to a MAPI provider. If available, we pass this through to a
+ * Simple MAPI provider. Otherwise, we maintain basic functionality
+ * ourselves.
+ */
ULONG WINAPI MAPILogon(ULONG_PTR uiparam, LPSTR profile, LPSTR password,
FLAGS flags, ULONG reserved, LPLHANDLE session)
{
- FIXME("(0x%08lx %s %p 0x%08x 0x%08x %p) Stub\n", uiparam,
+ TRACE("(0x%08lx %s %p 0x%08x 0x%08x %p)\n", uiparam,
debugstr_a(profile), password, flags, reserved, session);
+ if (mapiFunctions.MAPILogon)
+ return mapiFunctions.MAPILogon(uiparam, profile, password, flags, reserved, session);
+
if (session) *session = 1;
return SUCCESS_SUCCESS;
}
+/***********************************************************************
+ * MAPILogoff
+ *
+ * Logs off from a MAPI provider. If available, we pass this through to a
+ * Simple MAPI provider. Otherwise, we maintain basic functionality
+ * ourselves.
+ */
ULONG WINAPI MAPILogoff(LHANDLE session, ULONG_PTR uiparam, FLAGS flags,
ULONG reserved )
{
- FIXME("(0x%08lx 0x%08lx 0x%08x 0x%08x) Stub\n", session,
+ TRACE("(0x%08lx 0x%08lx 0x%08x 0x%08x)\n", session,
uiparam, flags, reserved);
+
+ if (mapiFunctions.MAPILogoff)
+ return mapiFunctions.MAPILogoff(session, uiparam, flags, reserved);
+
return SUCCESS_SUCCESS;
}
+/***********************************************************************
+ * MAPILogonEx
+ *
+ * Logs on to a MAPI provider. If available, we pass this through to an
+ * Extended MAPI provider. Otherwise, we return an error.
+ */
HRESULT WINAPI MAPILogonEx(ULONG_PTR uiparam, LPWSTR profile,
LPWSTR password, ULONG flags, LPMAPISESSION *session)
{
- FIXME("(0x%08lx %s %p 0x%08x %p) Stub\n", uiparam,
+ TRACE("(0x%08lx %s %p 0x%08x %p)\n", uiparam,
debugstr_w(profile), password, flags, session);
- return SUCCESS_SUCCESS;
+
+ if (mapiFunctions.MAPILogonEx)
+ return mapiFunctions.MAPILogonEx(uiparam, profile, password, flags, session);
+
+ return E_FAIL;
}
HRESULT WINAPI MAPIOpenLocalFormContainer(LPVOID *ppfcnt)
@@ -121,9 +162,20 @@ HRESULT WINAPI MAPIOpenLocalFormContainer(LPVOID *ppfcnt)
return E_FAIL;
}
+/***********************************************************************
+ * MAPIUninitialize
+ *
+ * Uninitialises the MAPI library. In our case, we pass through to the
+ * loaded Extended MAPI provider.
+ *
+ */
VOID WINAPI MAPIUninitialize(void)
{
- FIXME("Stub\n");
+ TRACE("()\n");
+
+ /* Try to uninitialise the Extended MAPI library */
+ if (mapiFunctions.MAPIUninitialize)
+ mapiFunctions.MAPIUninitialize();
}
HRESULT WINAPI MAPIAdminProfiles(ULONG ulFlags, LPPROFADMIN *lppProfAdmin)
More information about the wine-cvs
mailing list