user: Implement MNS_NOTIFYBYPOS.
[wine/wine64.git] / dlls / mapi32 / mapi32_main.c
blobd6a8c1cac1c0b3da27ee501e6db32532ba34c421
1 /*
2 * MAPI basics
4 * Copyright 2001 CodeWeavers Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <stdarg.h>
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winerror.h"
26 #include "objbase.h"
27 #include "mapix.h"
28 #include "mapi.h"
29 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(mapi);
33 LONG MAPI_ObjectCount = 0;
35 /***********************************************************************
36 * DllMain (MAPI32.init)
38 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
40 TRACE("(%p,%ld,%p)\n", hinstDLL, fdwReason, fImpLoad);
42 switch (fdwReason)
44 case DLL_PROCESS_ATTACH:
45 DisableThreadLibraryCalls(hinstDLL);
46 break;
47 case DLL_PROCESS_DETACH:
48 TRACE("DLL_PROCESS_DETACH: %ld objects remaining\n", MAPI_ObjectCount);
49 break;
51 return TRUE;
54 /***********************************************************************
55 * DllCanUnloadNow (MAPI32.28)
57 * Determine if this dll can be unloaded from the callers address space.
59 * PARAMS
60 * None.
62 * RETURNS
63 * S_OK, if the dll can be unloaded,
64 * S_FALSE, otherwise.
66 HRESULT WINAPI DllCanUnloadNow(void)
68 return MAPI_ObjectCount == 0 ? S_OK : S_FALSE;
71 HRESULT WINAPI MAPIInitialize(LPVOID init)
73 FIXME("(%p) Stub\n", init);
74 return SUCCESS_SUCCESS;
77 ULONG WINAPI MAPILogon(ULONG_PTR uiparam, LPSTR profile, LPSTR password,
78 FLAGS flags, ULONG reserved, LPLHANDLE session)
80 FIXME("(0x%08lx %s %p 0x%08lx 0x%08lx %p) Stub\n", uiparam,
81 debugstr_a(profile), password, flags, reserved, session);
83 if (session) *session = 1;
84 return SUCCESS_SUCCESS;
87 ULONG WINAPI MAPILogoff(LHANDLE session, ULONG_PTR uiparam, FLAGS flags,
88 ULONG reserved )
90 FIXME("(0x%08lx 0x%08lx 0x%08lx 0x%08lx) Stub\n", session,
91 uiparam, flags, reserved);
92 return SUCCESS_SUCCESS;
95 HRESULT WINAPI MAPILogonEx(ULONG_PTR uiparam, LPWSTR profile,
96 LPWSTR password, ULONG flags, LPMAPISESSION *session)
98 FIXME("(0x%08lx %s %p 0x%08lx %p) Stub\n", uiparam,
99 debugstr_w(profile), password, flags, session);
100 return SUCCESS_SUCCESS;
103 HRESULT WINAPI MAPIOpenLocalFormContainer(LPVOID *ppfcnt)
105 FIXME("(%p) Stub\n", ppfcnt);
106 return E_FAIL;
109 VOID WINAPI MAPIUninitialize(void)
111 FIXME("Stub\n");