wineconsole: Add HKCU registry entries for Insert Mode.
[wine/multimedia.git] / dlls / winemapi / main.c
blobb627d49a6b1c2fe001b9da2c1cc72fe93189d252
1 /*
2 * Wine MAPI provider
4 * Copyright 2009 Owen Rudge for CodeWeavers
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 "mapidefs.h"
28 #include "mapi.h"
29 #include "mapix.h"
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(winemapi);
35 ULONG WINAPI MAPIAddress(LHANDLE session, ULONG_PTR uiparam, LPSTR caption,
36 ULONG editfields, LPSTR labels, ULONG nRecips, lpMapiRecipDesc lpRecips,
37 FLAGS flags, ULONG reserved, LPULONG newRecips, lpMapiRecipDesc * lppNewRecips)
39 FIXME("(stub)\n");
40 return MAPI_E_NOT_SUPPORTED;
43 ULONG WINAPI MAPIDeleteMail(LHANDLE session, ULONG_PTR uiparam, LPSTR msg_id,
44 FLAGS flags, ULONG reserved)
46 FIXME("(stub)\n");
47 return MAPI_E_NOT_SUPPORTED;
50 ULONG WINAPI MAPIDetails(LHANDLE session, ULONG_PTR uiparam, lpMapiRecipDesc recip,
51 FLAGS flags, ULONG reserved)
53 FIXME("(stub)\n");
54 return MAPI_E_NOT_SUPPORTED;
57 ULONG WINAPI MAPIFindNext(LHANDLE session, ULONG_PTR uiparam, LPSTR msg_type,
58 LPSTR seed_msg_id, FLAGS flags, ULONG reserved, LPSTR msg_id)
60 FIXME("(stub)\n");
61 return MAPI_E_NOT_SUPPORTED;
64 ULONG WINAPI MAPILogon(ULONG_PTR uiparam, LPSTR profile, LPSTR password,
65 FLAGS flags, ULONG reserved, LPLHANDLE session)
67 TRACE("(0x%08lx %s %p 0x%08x 0x%08x %p)\n", uiparam,
68 debugstr_a(profile), password, flags, reserved, session);
70 if (session)
71 *session = 1;
73 return SUCCESS_SUCCESS;
76 ULONG WINAPI MAPILogoff(LHANDLE session, ULONG_PTR uiparam, FLAGS flags,
77 ULONG reserved)
79 TRACE("(0x%08lx 0x%08lx 0x%08x 0x%08x)\n", session,
80 uiparam, flags, reserved);
82 return SUCCESS_SUCCESS;
85 ULONG WINAPI MAPIReadMail(LHANDLE session, ULONG_PTR uiparam, LPSTR msg_id,
86 FLAGS flags, ULONG reserved, lpMapiMessage msg)
88 FIXME("(stub)\n");
89 return MAPI_E_NOT_SUPPORTED;
92 ULONG WINAPI MAPIResolveName(LHANDLE session, ULONG_PTR uiparam, LPSTR name,
93 FLAGS flags, ULONG reserved, lpMapiRecipDesc *recip)
95 static const char smtp[] = "SMTP:";
97 SCODE scode;
98 char *p;
100 TRACE("(0x%08lx 0x%08lx %s 0x%08x 0x%08x %p)\n", session, uiparam,
101 debugstr_a(name), flags, reserved, recip);
103 if (!name || !name[0])
104 return MAPI_E_FAILURE;
106 scode = MAPIAllocateBuffer(sizeof(**recip) + sizeof(smtp) + strlen(name),
107 (LPVOID *)recip);
108 if (scode != S_OK)
109 return MAPI_E_INSUFFICIENT_MEMORY;
111 ZeroMemory(*recip, sizeof(**recip));
112 p = (char *)(*recip + 1);
113 strcpy(p, smtp);
114 strcpy(p + sizeof(smtp) - 1, name);
116 (*recip)->ulRecipClass = MAPI_TO;
117 (*recip)->lpszName = p + sizeof(smtp) - 1;
118 (*recip)->lpszAddress = p;
119 return SUCCESS_SUCCESS;
122 ULONG WINAPI MAPISaveMail(LHANDLE session, ULONG_PTR uiparam, lpMapiMessage msg,
123 FLAGS flags, ULONG reserved, LPSTR msg_id)
125 FIXME("(stub)\n");
126 return MAPI_E_NOT_SUPPORTED;