mapi32: Implement MAPIInitialize, Logon, Logoff, LogonEx, Uninitialize.

This commit is contained in:
Owen Rudge 2009-09-18 15:15:45 +01:00 committed by Alexandre Julliard
parent 69156f5ae2
commit 421ab509fc
1 changed files with 59 additions and 7 deletions

View File

@ -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)