1 |
/* wptMAPI.cpp |
/* wptMAPI.cpp |
2 |
* Copyright (C) 2003, 2004 Timo Schulz |
* Copyright (C) 2003, 2004, 2005 Timo Schulz |
3 |
* |
* |
4 |
* This file is part of WinPT. |
* This file is part of WinPT. |
5 |
* |
* |
44 |
#define load_one_fnc(cast, hlib, name) (cast)GetProcAddress ((hlib), name) |
#define load_one_fnc(cast, hlib, name) (cast)GetProcAddress ((hlib), name) |
45 |
|
|
46 |
|
|
47 |
|
/* Load MAPI library and set function pointers. |
48 |
|
Return value: 0 on success. */ |
49 |
int |
int |
50 |
mapi_init (void) |
mapi_init (void) |
51 |
{ |
{ |
65 |
init = 1; |
init = 1; |
66 |
|
|
67 |
return 0; |
return 0; |
68 |
} /* mapi_init */ |
} |
69 |
|
|
70 |
|
|
71 |
|
/* Free library and cleanup. */ |
72 |
void |
void |
73 |
mapi_deinit (void) |
mapi_deinit (void) |
74 |
{ |
{ |
77 |
hlib = NULL; |
hlib = NULL; |
78 |
init = 0; |
init = 0; |
79 |
} |
} |
80 |
} /* mapi_deinit */ |
} |
81 |
|
|
82 |
#if 0 /* low:priority XXX port the code */ |
|
83 |
|
/* Send the file given in @ascfile via the MAPI mechanism. */ |
84 |
int |
int |
85 |
mapi_send_ascfile (char *ascfile) |
mapi_send_ascfile (char *ascfile) |
86 |
{ |
{ |
107 |
} |
} |
108 |
|
|
109 |
|
|
110 |
|
/* Send a public key stored in @keyfile with the keyid @keyid |
111 |
|
via the MAPI mechanism to a mail recipient. |
112 |
|
Return value: SUCCESS_SUCCESS on succes. */ |
113 |
int |
int |
114 |
mapi_send_pubkey (const char *keyid, char *keyfile) |
mapi_send_pubkey (const char *keyid, char *keyfile) |
115 |
{ |
{ |
141 |
mapi_logoff (hd, 0, 0, 0); |
mapi_logoff (hd, 0, 0, 0); |
142 |
free_if_alloc (keyinf); |
free_if_alloc (keyinf); |
143 |
return rc; |
return rc; |
144 |
} /* mapi_send_pubkey */ |
} |
145 |
|
|
146 |
|
|
147 |
|
#if 0 /* low:priority XXX port the code */ |
148 |
static void |
static void |
149 |
free_mapi_msg (MapiMessage * msg) |
free_mapi_msg (MapiMessage * msg) |
150 |
{ |
{ |