ReactOS 0.4.15-dev-8344-g0574987
mapi32_main.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "objbase.h"
#include "initguid.h"
#include "mapix.h"
#include "mapiform.h"
#include "mapi.h"
#include "wine/debug.h"
#include "util.h"
Include dependency graph for mapi32_main.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (mapi)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID iid, LPVOID *ppv)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
HRESULT WINAPI MAPIInitialize (LPVOID init)
 
ULONG WINAPI MAPILogon (ULONG_PTR uiparam, LPSTR profile, LPSTR password, FLAGS flags, ULONG reserved, LPLHANDLE session)
 
ULONG WINAPI MAPILogoff (LHANDLE session, ULONG_PTR uiparam, FLAGS flags, ULONG reserved)
 
HRESULT WINAPI MAPILogonEx (ULONG_PTR uiparam, LPWSTR profile, LPWSTR password, ULONG flags, LPMAPISESSION *session)
 
HRESULT WINAPI MAPIOpenLocalFormContainer (LPVOID *ppfcnt)
 
VOID WINAPI MAPIUninitialize (void)
 
HRESULT WINAPI MAPIAdminProfiles (ULONG ulFlags, LPPROFADMIN *lppProfAdmin)
 
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)
 
ULONG WINAPI MAPIDeleteMail (LHANDLE session, ULONG_PTR uiparam, LPSTR msg_id, FLAGS flags, ULONG reserved)
 
ULONG WINAPI MAPIDetails (LHANDLE session, ULONG_PTR uiparam, lpMapiRecipDesc recip, FLAGS flags, ULONG reserved)
 
ULONG WINAPI MAPIFindNext (LHANDLE session, ULONG_PTR uiparam, LPSTR msg_type, LPSTR seed_msg_id, FLAGS flags, ULONG reserved, LPSTR msg_id)
 
ULONG WINAPI MAPIReadMail (LHANDLE session, ULONG_PTR uiparam, LPSTR msg_id, FLAGS flags, ULONG reserved, lpMapiMessage msg)
 
ULONG WINAPI MAPIResolveName (LHANDLE session, ULONG_PTR uiparam, LPSTR name, FLAGS flags, ULONG reserved, lpMapiRecipDesc *recip)
 
ULONG WINAPI MAPISaveMail (LHANDLE session, ULONG_PTR uiparam, lpMapiMessage msg, FLAGS flags, ULONG reserved, LPSTR msg_id)
 

Variables

DECLSPEC_HIDDEN LONG MAPI_ObjectCount = 0
 
DECLSPEC_HIDDEN HINSTANCE hInstMAPI32
 

Function Documentation

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 93 of file mapi32_main.c.

94{
96
97 if (mapiFunctions.DllCanUnloadNow)
98 {
99 ret = mapiFunctions.DllCanUnloadNow();
100 TRACE("(): provider returns %d\n", ret);
101 }
102
103 return MAPI_ObjectCount == 0 ? ret : S_FALSE;
104}
MAPI_FUNCTIONS mapiFunctions
Definition: util.c:49
#define S_OK
Definition: intsafe.h:52
DECLSPEC_HIDDEN LONG MAPI_ObjectCount
Definition: mapi32_main.c:36
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define S_FALSE
Definition: winerror.h:2357

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  iid,
LPVOID ppv 
)

Definition at line 65 of file mapi32_main.c.

66{
67 if (mapiFunctions.DllGetClassObject)
68 {
69 HRESULT ret = mapiFunctions.DllGetClassObject(rclsid, iid, ppv);
70
71 TRACE("ret: %x\n", ret);
72 return ret;
73 }
74
75 FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n", debugstr_guid(rclsid), debugstr_guid(iid));
76
77 *ppv = NULL;
79}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define NULL
Definition: types.h:112
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  fImpLoad 
)

Definition at line 42 of file mapi32_main.c.

43{
44 TRACE("(%p,%d,%p)\n", hinstDLL, fdwReason, fImpLoad);
45
46 switch (fdwReason)
47 {
49 hInstMAPI32 = hinstDLL;
52 break;
54 if (fImpLoad) break;
55 TRACE("DLL_PROCESS_DETACH: %d objects remaining\n", MAPI_ObjectCount);
57 break;
58 }
59 return TRUE;
60}
DWORD LPVOID fImpLoad
Definition: misc.cpp:155
#define TRUE
Definition: types.h:120
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
void unload_mapi_providers(void)
Definition: util.c:1135
void load_mapi_providers(void)
Definition: util.c:1023
DECLSPEC_HIDDEN HINSTANCE hInstMAPI32
Definition: mapi32_main.c:37

◆ MAPIAddress()

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 
)

Definition at line 214 of file mapi32_main.c.

217{
219 return mapiFunctions.MAPIAddress(session, uiparam, caption, editfields, labels,
220 nRecips, lpRecips, flags, reserved, newRecips, lppNewRecips);
221
223}
r reserved
Definition: btrfs.c:3006
GLbitfield flags
Definition: glext.h:7161
#define MAPI_E_NOT_SUPPORTED
Definition: mapi.h:152
LPMAPIADDRESS MAPIAddress
Definition: util.h:32

◆ MAPIAdminProfiles()

HRESULT WINAPI MAPIAdminProfiles ( ULONG  ulFlags,
LPPROFADMIN lppProfAdmin 
)

Definition at line 204 of file mapi32_main.c.

205{
206 if (mapiFunctions.MAPIAdminProfiles)
207 return mapiFunctions.MAPIAdminProfiles(ulFlags, lppProfAdmin);
208
209 FIXME("(%u, %p): stub\n", ulFlags, lppProfAdmin);
210 *lppProfAdmin = NULL;
211 return E_FAIL;
212}
#define E_FAIL
Definition: ddrawi.h:102

◆ MAPIDeleteMail()

ULONG WINAPI MAPIDeleteMail ( LHANDLE  session,
ULONG_PTR  uiparam,
LPSTR  msg_id,
FLAGS  flags,
ULONG  reserved 
)

Definition at line 225 of file mapi32_main.c.

227{
230
232}
msg_id
Definition: edit.c:43
LPMAPIDELETEMAIL MAPIDeleteMail
Definition: util.h:33

◆ MAPIDetails()

ULONG WINAPI MAPIDetails ( LHANDLE  session,
ULONG_PTR  uiparam,
lpMapiRecipDesc  recip,
FLAGS  flags,
ULONG  reserved 
)

Definition at line 234 of file mapi32_main.c.

236{
238 return mapiFunctions.MAPIDetails(session, uiparam, recip, flags, reserved);
239
241}
LPMAPIDETAILS MAPIDetails
Definition: util.h:34

◆ MAPIFindNext()

ULONG WINAPI MAPIFindNext ( LHANDLE  session,
ULONG_PTR  uiparam,
LPSTR  msg_type,
LPSTR  seed_msg_id,
FLAGS  flags,
ULONG  reserved,
LPSTR  msg_id 
)

Definition at line 243 of file mapi32_main.c.

245{
247 return mapiFunctions.MAPIFindNext(session, uiparam, msg_type, seed_msg_id, flags, reserved, msg_id);
248
250}
msg_type
Definition: rpc_msg.h:77
LPMAPIFINDNEXT MAPIFindNext
Definition: util.h:35

◆ MAPIInitialize()

HRESULT WINAPI MAPIInitialize ( LPVOID  init)

Definition at line 112 of file mapi32_main.c.

113{
114 TRACE("(%p)\n", init);
115
118
120}
#define MAPI_E_NOT_INITIALIZED
Definition: mapicode.h:77
LPMAPIINITIALIZE MAPIInitialize
Definition: util.h:36
static int init
Definition: wintirpc.c:33

◆ MAPILogoff()

ULONG WINAPI MAPILogoff ( LHANDLE  session,
ULONG_PTR  uiparam,
FLAGS  flags,
ULONG  reserved 
)

Definition at line 149 of file mapi32_main.c.

151{
152 TRACE("(0x%08lx 0x%08lx 0x%08x 0x%08x)\n", session,
153 uiparam, flags, reserved);
154
156 return mapiFunctions.MAPILogoff(session, uiparam, flags, reserved);
157
158 return SUCCESS_SUCCESS;
159}
#define SUCCESS_SUCCESS
Definition: mapi.h:122
LPMAPILOGOFF MAPILogoff
Definition: util.h:37

◆ MAPILogon()

ULONG WINAPI MAPILogon ( ULONG_PTR  uiparam,
LPSTR  profile,
LPSTR  password,
FLAGS  flags,
ULONG  reserved,
LPLHANDLE  session 
)

Definition at line 129 of file mapi32_main.c.

131{
132 TRACE("(0x%08lx %s %p 0x%08x 0x%08x %p)\n", uiparam,
134
137
138 if (session) *session = 1;
139 return SUCCESS_SUCCESS;
140}
#define debugstr_a
Definition: kernel32.h:31
#define profile
Definition: kernel32.h:12
static WCHAR password[]
Definition: url.c:33
LPMAPILOGON MAPILogon
Definition: util.h:38

◆ MAPILogonEx()

HRESULT WINAPI MAPILogonEx ( ULONG_PTR  uiparam,
LPWSTR  profile,
LPWSTR  password,
ULONG  flags,
LPMAPISESSION session 
)

Definition at line 167 of file mapi32_main.c.

169{
170 TRACE("(0x%08lx %s %p 0x%08x %p)\n", uiparam,
172
175
176 return E_FAIL;
177}
#define debugstr_w
Definition: kernel32.h:32
LPMAPILOGONEX MAPILogonEx
Definition: util.h:39

◆ MAPIOpenLocalFormContainer()

HRESULT WINAPI MAPIOpenLocalFormContainer ( LPVOID ppfcnt)

Definition at line 179 of file mapi32_main.c.

180{
181 if (mapiFunctions.MAPIOpenLocalFormContainer)
182 return mapiFunctions.MAPIOpenLocalFormContainer(ppfcnt);
183
184 FIXME("(%p) Stub\n", ppfcnt);
185 return E_FAIL;
186}

◆ MAPIReadMail()

ULONG WINAPI MAPIReadMail ( LHANDLE  session,
ULONG_PTR  uiparam,
LPSTR  msg_id,
FLAGS  flags,
ULONG  reserved,
lpMapiMessage  msg 
)

Definition at line 252 of file mapi32_main.c.

254{
257
259}
#define msg(x)
Definition: auth_time.c:54
LPMAPIREADMAIL MAPIReadMail
Definition: util.h:40

◆ MAPIResolveName()

ULONG WINAPI MAPIResolveName ( LHANDLE  session,
ULONG_PTR  uiparam,
LPSTR  name,
FLAGS  flags,
ULONG  reserved,
lpMapiRecipDesc recip 
)

Definition at line 261 of file mapi32_main.c.

263{
265 return mapiFunctions.MAPIResolveName(session, uiparam, name, flags, reserved, recip);
266
268}
LPMAPIRESOLVENAME MAPIResolveName
Definition: util.h:41
Definition: name.c:39

◆ MAPISaveMail()

ULONG WINAPI MAPISaveMail ( LHANDLE  session,
ULONG_PTR  uiparam,
lpMapiMessage  msg,
FLAGS  flags,
ULONG  reserved,
LPSTR  msg_id 
)

Definition at line 270 of file mapi32_main.c.

272{
275
277}
LPMAPISAVEMAIL MAPISaveMail
Definition: util.h:42

◆ MAPIUninitialize()

VOID WINAPI MAPIUninitialize ( void  )

Definition at line 195 of file mapi32_main.c.

196{
197 TRACE("()\n");
198
199 /* Try to uninitialise the Extended MAPI library */
202}
LPMAPIUNINITIALIZE MAPIUninitialize
Definition: util.h:46

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( mapi  )

Variable Documentation

◆ hInstMAPI32

Definition at line 37 of file mapi32_main.c.

Referenced by DllMain(), MAPISendMail(), and MAPISendMailW().

◆ MAPI_ObjectCount

DECLSPEC_HIDDEN LONG MAPI_ObjectCount = 0