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
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
)
40 return MAPI_E_NOT_SUPPORTED
;
43 ULONG WINAPI
MAPIDeleteMail(LHANDLE session
, ULONG_PTR uiparam
, LPSTR msg_id
,
44 FLAGS flags
, ULONG reserved
)
47 return MAPI_E_NOT_SUPPORTED
;
50 ULONG WINAPI
MAPIDetails(LHANDLE session
, ULONG_PTR uiparam
, lpMapiRecipDesc recip
,
51 FLAGS flags
, ULONG reserved
)
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
)
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%08Ix %s %p 0x%08lx 0x%08lx %p)\n", uiparam
,
68 debugstr_a(profile
), password
, flags
, reserved
, session
);
73 return SUCCESS_SUCCESS
;
76 ULONG WINAPI
MAPILogoff(LHANDLE session
, ULONG_PTR uiparam
, FLAGS flags
,
79 TRACE("(0x%08Ix 0x%08Ix 0x%08lx 0x%08lx)\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
)
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:";
100 TRACE("(0x%08Ix 0x%08Ix %s 0x%08lx 0x%08lx %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
),
109 return MAPI_E_INSUFFICIENT_MEMORY
;
111 ZeroMemory(*recip
, sizeof(**recip
));
112 p
= (char *)(*recip
+ 1);
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
)
126 return MAPI_E_NOT_SUPPORTED
;