Artifact d8f5f739d62d3fbe085a903d88d5368bde12376b:
- File
src/win32/mapi.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /*************** 0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0d 0a 2a 20 20 20 20 ********\..* 0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0060: 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 70 map 0070: 69 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 20 i.d 0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0090: 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 20 *..* 00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d *. 00e0: 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .* 00f0: 20 20 20 20 20 20 20 20 20 57 69 6e 64 6f 77 73 Windows 0100: 20 41 50 49 20 68 65 61 64 65 72 20 6d 6f 64 75 API header modu 0110: 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 le 0120: 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 20 *..* 0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0170: 20 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 *..* 0180: 20 20 20 20 20 20 20 20 20 54 72 61 6e 73 6c 61 Transla 0190: 74 65 64 20 66 72 6f 6d 20 4d 69 6e 47 57 20 57 ted from MinGW W 01a0: 69 6e 64 6f 77 73 20 68 65 61 64 65 72 73 20 20 indows headers 01b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a * 01c0: 0d 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..* 01d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 79 by 01e0: 20 53 74 65 77 61 72 74 20 47 6f 72 64 6f 6e 20 Stewart Gordon 01f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0200: 20 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 *..* 0210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0220: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0230: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0240: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0250: 20 20 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 *..* 0260: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0270: 50 6c 61 63 65 64 20 69 6e 74 6f 20 70 75 62 6c Placed into publ 0280: 69 63 20 64 6f 6d 61 69 6e 20 20 20 20 20 20 20 ic domain 0290: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 02a0: 2a 0d 0a 5c 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a *..\************ 02b0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 02c0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 02d0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a **************** 02e0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2f 0d 0a 6d 6f ***********/..mo 02f0: 64 75 6c 65 20 77 69 6e 33 32 2e 6d 61 70 69 3b dule win32.mapi; 0300: 0d 0a 0d 0a 70 72 69 76 61 74 65 20 69 6d 70 6f ....private impo 0310: 72 74 20 77 69 6e 33 32 2e 77 69 6e 64 65 66 3b rt win32.windef; 0320: 0d 0a 0d 0a 2f 2f 20 46 49 58 4d 45 3a 20 63 68 ....// FIXME: ch 0330: 65 63 6b 20 74 79 70 65 73 20 61 6e 64 20 67 72 eck types and gr 0340: 6f 75 70 69 6e 67 20 6f 66 20 63 6f 6e 73 74 61 ouping of consta 0350: 6e 74 73 0d 0a 0d 0a 65 6e 75 6d 20 7b 0d 0a 09 nts....enum {... 0360: 53 55 43 43 45 53 53 5f 53 55 43 43 45 53 53 2c SUCCESS_SUCCESS, 0370: 0d 0a 09 4d 41 50 49 5f 55 53 45 52 5f 41 42 4f ...MAPI_USER_ABO 0380: 52 54 2c 0d 0a 09 4d 41 50 49 5f 45 5f 55 53 45 RT,...MAPI_E_USE 0390: 52 5f 41 42 4f 52 54 20 20 20 20 20 20 20 20 3d R_ABORT = 03a0: 20 4d 41 50 49 5f 55 53 45 52 5f 41 42 4f 52 54 MAPI_USER_ABORT 03b0: 2c 0d 0a 09 4d 41 50 49 5f 45 5f 46 41 49 4c 55 ,...MAPI_E_FAILU 03c0: 52 45 2c 0d 0a 09 4d 41 50 49 5f 45 5f 4c 4f 47 RE,...MAPI_E_LOG 03d0: 49 4e 5f 46 41 49 4c 55 52 45 2c 0d 0a 09 4d 41 IN_FAILURE,...MA 03e0: 50 49 5f 45 5f 4c 4f 47 4f 4e 5f 46 41 49 4c 55 PI_E_LOGON_FAILU 03f0: 52 45 20 20 20 20 20 3d 20 4d 41 50 49 5f 45 5f RE = MAPI_E_ 0400: 4c 4f 47 49 4e 5f 46 41 49 4c 55 52 45 2c 0d 0a LOGIN_FAILURE,.. 0410: 09 4d 41 50 49 5f 45 5f 44 49 53 4b 5f 46 55 4c .MAPI_E_DISK_FUL 0420: 4c 09 20 20 20 20 20 3d 20 34 2c 0d 0a 09 4d 41 L. = 4,...MA 0430: 50 49 5f 45 5f 49 4e 53 55 46 46 49 43 49 45 4e PI_E_INSUFFICIEN 0440: 54 5f 4d 45 4d 4f 52 59 2c 0d 0a 09 4d 41 50 49 T_MEMORY,...MAPI 0450: 5f 45 5f 41 43 43 45 53 53 5f 44 45 4e 49 45 44 _E_ACCESS_DENIED 0460: 2c 0d 0a 09 4d 41 50 49 5f 45 5f 42 4c 4b 5f 54 ,...MAPI_E_BLK_T 0470: 4f 4f 5f 53 4d 41 4c 4c 20 20 20 20 20 3d 20 4d OO_SMALL = M 0480: 41 50 49 5f 45 5f 41 43 43 45 53 53 5f 44 45 4e API_E_ACCESS_DEN 0490: 49 45 44 2c 20 2f 2f 20 3d 20 36 0d 0a 09 4d 41 IED, // = 6...MA 04a0: 50 49 5f 45 5f 54 4f 4f 5f 4d 41 4e 59 5f 53 45 PI_E_TOO_MANY_SE 04b0: 53 53 49 4f 4e 53 20 3d 20 38 2c 0d 0a 09 4d 41 SSIONS = 8,...MA 04c0: 50 49 5f 45 5f 54 4f 4f 5f 4d 41 4e 59 5f 46 49 PI_E_TOO_MANY_FI 04d0: 4c 45 53 2c 0d 0a 09 4d 41 50 49 5f 45 5f 54 4f LES,...MAPI_E_TO 04e0: 4f 5f 4d 41 4e 59 5f 52 45 43 49 50 49 45 4e 54 O_MANY_RECIPIENT 04f0: 53 2c 0d 0a 09 4d 41 50 49 5f 45 5f 41 54 54 41 S,...MAPI_E_ATTA 0500: 43 48 4d 45 4e 54 5f 4e 4f 54 5f 46 4f 55 4e 44 CHMENT_NOT_FOUND 0510: 2c 0d 0a 09 4d 41 50 49 5f 45 5f 41 54 54 41 43 ,...MAPI_E_ATTAC 0520: 48 4d 45 4e 54 5f 4f 50 45 4e 5f 46 41 49 4c 55 HMENT_OPEN_FAILU 0530: 52 45 2c 0d 0a 09 4d 41 50 49 5f 45 5f 41 54 54 RE,...MAPI_E_ATT 0540: 41 43 48 4d 45 4e 54 5f 57 52 49 54 45 5f 46 41 ACHMENT_WRITE_FA 0550: 49 4c 55 52 45 2c 0d 0a 09 4d 41 50 49 5f 45 5f ILURE,...MAPI_E_ 0560: 55 4e 4b 4e 4f 57 4e 5f 52 45 43 49 50 49 45 4e UNKNOWN_RECIPIEN 0570: 54 2c 0d 0a 09 4d 41 50 49 5f 45 5f 42 41 44 5f T,...MAPI_E_BAD_ 0580: 52 45 43 49 50 54 59 50 45 2c 0d 0a 09 4d 41 50 RECIPTYPE,...MAP 0590: 49 5f 45 5f 4e 4f 5f 4d 45 53 53 41 47 45 53 2c I_E_NO_MESSAGES, 05a0: 0d 0a 09 4d 41 50 49 5f 45 5f 49 4e 56 41 4c 49 ...MAPI_E_INVALI 05b0: 44 5f 4d 45 53 53 41 47 45 2c 0d 0a 09 4d 41 50 D_MESSAGE,...MAP 05c0: 49 5f 45 5f 54 45 58 54 5f 54 4f 4f 5f 4c 41 52 I_E_TEXT_TOO_LAR 05d0: 47 45 2c 0d 0a 09 4d 41 50 49 5f 45 5f 49 4e 56 GE,...MAPI_E_INV 05e0: 41 4c 49 44 5f 53 45 53 53 49 4f 4e 2c 0d 0a 09 ALID_SESSION,... 05f0: 4d 41 50 49 5f 45 5f 54 59 50 45 5f 4e 4f 54 5f MAPI_E_TYPE_NOT_ 0600: 53 55 50 50 4f 52 54 45 44 2c 0d 0a 09 4d 41 50 SUPPORTED,...MAP 0610: 49 5f 45 5f 41 4d 42 49 47 55 4f 55 53 5f 52 45 I_E_AMBIGUOUS_RE 0620: 43 49 50 49 45 4e 54 2c 0d 0a 09 4d 41 50 49 5f CIPIENT,...MAPI_ 0630: 45 5f 41 4d 42 49 47 55 4f 55 53 5f 52 45 43 49 E_AMBIGUOUS_RECI 0640: 50 20 20 20 3d 20 4d 41 50 49 5f 45 5f 41 4d 42 P = MAPI_E_AMB 0650: 49 47 55 4f 55 53 5f 52 45 43 49 50 49 45 4e 54 IGUOUS_RECIPIENT 0660: 2c 0d 0a 09 4d 41 50 49 5f 45 5f 4d 45 53 53 41 ,...MAPI_E_MESSA 0670: 47 45 5f 49 4e 5f 55 53 45 2c 0d 0a 09 4d 41 50 GE_IN_USE,...MAP 0680: 49 5f 45 5f 4e 45 54 57 4f 52 4b 5f 46 41 49 4c I_E_NETWORK_FAIL 0690: 55 52 45 2c 0d 0a 09 4d 41 50 49 5f 45 5f 49 4e URE,...MAPI_E_IN 06a0: 56 41 4c 49 44 5f 45 44 49 54 46 49 45 4c 44 53 VALID_EDITFIELDS 06b0: 2c 0d 0a 09 4d 41 50 49 5f 45 5f 49 4e 56 41 4c ,...MAPI_E_INVAL 06c0: 49 44 5f 52 45 43 49 50 53 2c 0d 0a 09 4d 41 50 ID_RECIPS,...MAP 06d0: 49 5f 45 5f 4e 4f 54 5f 53 55 50 50 4f 52 54 45 I_E_NOT_SUPPORTE 06e0: 44 20 20 2f 2f 20 3d 20 32 36 0d 0a 7d 0d 0a 0d D // = 26..}... 06f0: 0a 65 6e 75 6d 20 7b 0d 0a 09 4d 41 50 49 5f 4f .enum {...MAPI_O 0700: 52 49 47 2c 0d 0a 09 4d 41 50 49 5f 54 4f 2c 0d RIG,...MAPI_TO,. 0710: 0a 09 4d 41 50 49 5f 43 43 2c 0d 0a 09 4d 41 50 ..MAPI_CC,...MAP 0720: 49 5f 42 43 43 0d 0a 7d 0d 0a 0d 0a 63 6f 6e 73 I_BCC..}....cons 0730: 74 20 4d 41 50 49 5f 4c 4f 47 4f 4e 5f 55 49 20 t MAPI_LOGON_UI 0740: 20 20 20 20 20 20 20 20 20 3d 20 30 78 30 30 30 = 0x000 0750: 31 3b 0d 0a 63 6f 6e 73 74 20 4d 41 50 49 5f 4e 1;..const MAPI_N 0760: 45 57 5f 53 45 53 53 49 4f 4e 20 20 20 20 20 20 EW_SESSION 0770: 20 3d 20 30 78 30 30 30 32 3b 0d 0a 63 6f 6e 73 = 0x0002;..cons 0780: 74 20 4d 41 50 49 5f 46 4f 52 43 45 5f 44 4f 57 t MAPI_FORCE_DOW 0790: 4e 4c 4f 41 44 20 20 20 20 3d 20 30 78 31 30 30 NLOAD = 0x100 07a0: 30 3b 0d 0a 63 6f 6e 73 74 20 4d 41 50 49 5f 4c 0;..const MAPI_L 07b0: 4f 47 4f 46 46 5f 53 48 41 52 45 44 20 20 20 20 OGOFF_SHARED 07c0: 20 3d 20 30 78 30 30 30 31 3b 0d 0a 63 6f 6e 73 = 0x0001;..cons 07d0: 74 20 4d 41 50 49 5f 4c 4f 47 4f 46 46 5f 55 49 t MAPI_LOGOFF_UI 07e0: 20 20 20 20 20 20 20 20 20 3d 20 30 78 30 30 30 = 0x000 07f0: 32 3b 0d 0a 63 6f 6e 73 74 20 4d 41 50 49 5f 44 2;..const MAPI_D 0800: 49 41 4c 4f 47 20 20 20 20 20 20 20 20 20 20 20 IALOG 0810: 20 3d 20 30 78 30 30 30 38 3b 0d 0a 63 6f 6e 73 = 0x0008;..cons 0820: 74 20 4d 41 50 49 5f 55 4e 52 45 41 44 5f 4f 4e t MAPI_UNREAD_ON 0830: 4c 59 20 20 20 20 20 20 20 3d 20 30 78 30 30 32 LY = 0x002 0840: 30 3b 0d 0a 63 6f 6e 73 74 20 4d 41 50 49 5f 4c 0;..const MAPI_L 0850: 4f 4e 47 5f 4d 53 47 49 44 20 20 20 20 20 20 20 ONG_MSGID 0860: 20 3d 20 30 78 34 30 30 30 3b 0d 0a 63 6f 6e 73 = 0x4000;..cons 0870: 74 20 4d 41 50 49 5f 47 55 41 52 41 4e 54 45 45 t MAPI_GUARANTEE 0880: 5f 46 49 46 4f 20 20 20 20 3d 20 30 78 30 31 30 _FIFO = 0x010 0890: 30 3b 0d 0a 63 6f 6e 73 74 20 4d 41 50 49 5f 45 0;..const MAPI_E 08a0: 4e 56 45 4c 4f 50 45 5f 4f 4e 4c 59 20 20 20 20 NVELOPE_ONLY 08b0: 20 3d 20 30 78 30 30 34 30 3b 0d 0a 63 6f 6e 73 = 0x0040;..cons 08c0: 74 20 4d 41 50 49 5f 50 45 45 4b 20 20 20 20 20 t MAPI_PEEK 08d0: 20 20 20 20 20 20 20 20 20 3d 20 30 78 30 30 38 = 0x008 08e0: 30 3b 0d 0a 63 6f 6e 73 74 20 4d 41 50 49 5f 42 0;..const MAPI_B 08f0: 4f 44 59 5f 41 53 5f 46 49 4c 45 20 20 20 20 20 ODY_AS_FILE 0900: 20 3d 20 30 78 30 32 30 30 3b 0d 0a 63 6f 6e 73 = 0x0200;..cons 0910: 74 20 4d 41 50 49 5f 53 55 50 50 52 45 53 53 5f t MAPI_SUPPRESS_ 0920: 41 54 54 41 43 48 20 20 20 3d 20 30 78 30 38 30 ATTACH = 0x080 0930: 30 3b 0d 0a 63 6f 6e 73 74 20 4d 41 50 49 5f 41 0;..const MAPI_A 0940: 42 5f 4e 4f 4d 4f 44 49 46 59 20 20 20 20 20 20 B_NOMODIFY 0950: 20 3d 20 30 78 30 34 30 30 3b 0d 0a 63 6f 6e 73 = 0x0400;..cons 0960: 74 20 4d 41 50 49 5f 4f 4c 45 20 20 20 20 20 20 t MAPI_OLE 0970: 20 20 20 20 20 20 20 20 20 3d 20 30 78 30 30 30 = 0x000 0980: 31 3b 0d 0a 63 6f 6e 73 74 20 4d 41 50 49 5f 4f 1;..const MAPI_O 0990: 4c 45 5f 53 54 41 54 49 43 20 20 20 20 20 20 20 LE_STATIC 09a0: 20 3d 20 30 78 30 30 30 32 3b 0d 0a 63 6f 6e 73 = 0x0002;..cons 09b0: 74 20 4d 41 50 49 5f 55 4e 52 45 41 44 20 20 20 t MAPI_UNREAD 09c0: 20 20 20 20 20 20 20 20 20 3d 20 30 78 30 30 30 = 0x000 09d0: 31 3b 0d 0a 63 6f 6e 73 74 20 4d 41 50 49 5f 52 1;..const MAPI_R 09e0: 45 43 45 49 50 54 5f 52 45 51 55 45 53 54 45 44 ECEIPT_REQUESTED 09f0: 20 3d 20 30 78 30 30 30 32 3b 0d 0a 63 6f 6e 73 = 0x0002;..cons 0a00: 74 20 4d 41 50 49 5f 53 45 4e 54 20 20 20 20 20 t MAPI_SENT 0a10: 20 20 20 20 20 20 20 20 20 3d 20 30 78 30 30 30 = 0x000 0a20: 34 3b 0d 0a 0d 0a 61 6c 69 61 73 20 75 69 6e 74 4;....alias uint 0a30: 20 46 4c 41 47 53 2c 20 4c 48 41 4e 44 4c 45 3b FLAGS, LHANDLE; 0a40: 0d 0a 61 6c 69 61 73 20 75 69 6e 74 2a 20 4c 50 ..alias uint* LP 0a50: 4c 48 41 4e 44 4c 45 2c 20 4c 50 55 4c 4f 4e 47 LHANDLE, LPULONG 0a60: 3b 0d 0a 0d 0a 73 74 72 75 63 74 20 4d 61 70 69 ;....struct Mapi 0a70: 52 65 63 69 70 44 65 73 63 20 7b 0d 0a 09 55 4c RecipDesc {...UL 0a80: 4f 4e 47 20 20 75 6c 52 65 73 65 72 76 65 64 3b ONG ulReserved; 0a90: 0d 0a 09 55 4c 4f 4e 47 20 20 75 6c 52 65 63 69 ...ULONG ulReci 0aa0: 70 43 6c 61 73 73 3b 0d 0a 09 4c 50 53 54 52 20 pClass;...LPSTR 0ab0: 20 6c 70 73 7a 4e 61 6d 65 3b 0d 0a 09 4c 50 53 lpszName;...LPS 0ac0: 54 52 20 20 6c 70 73 7a 41 64 64 72 65 73 73 3b TR lpszAddress; 0ad0: 0d 0a 09 55 4c 4f 4e 47 20 20 75 6c 45 49 44 53 ...ULONG ulEIDS 0ae0: 69 7a 65 3b 0d 0a 09 4c 50 56 4f 49 44 20 6c 70 ize;...LPVOID lp 0af0: 45 6e 74 72 79 49 44 3b 0d 0a 7d 0d 0a 61 6c 69 EntryID;..}..ali 0b00: 61 73 20 4d 61 70 69 52 65 63 69 70 44 65 73 63 as MapiRecipDesc 0b10: 2a 20 6c 70 4d 61 70 69 52 65 63 69 70 44 65 73 * lpMapiRecipDes 0b20: 63 3b 0d 0a 0d 0a 73 74 72 75 63 74 20 4d 61 70 c;....struct Map 0b30: 69 46 69 6c 65 44 65 73 63 20 7b 0d 0a 09 55 4c iFileDesc {...UL 0b40: 4f 4e 47 20 20 75 6c 52 65 73 65 72 76 65 64 3b ONG ulReserved; 0b50: 0d 0a 09 55 4c 4f 4e 47 20 20 66 6c 46 6c 61 67 ...ULONG flFlag 0b60: 73 3b 0d 0a 09 55 4c 4f 4e 47 20 20 6e 50 6f 73 s;...ULONG nPos 0b70: 69 74 69 6f 6e 3b 0d 0a 09 4c 50 53 54 52 20 20 ition;...LPSTR 0b80: 6c 70 73 7a 50 61 74 68 4e 61 6d 65 3b 0d 0a 09 lpszPathName;... 0b90: 4c 50 53 54 52 20 20 6c 70 73 7a 46 69 6c 65 4e LPSTR lpszFileN 0ba0: 61 6d 65 3b 0d 0a 09 4c 50 56 4f 49 44 20 6c 70 ame;...LPVOID lp 0bb0: 46 69 6c 65 54 79 70 65 3b 0d 0a 7d 0d 0a 61 6c FileType;..}..al 0bc0: 69 61 73 20 4d 61 70 69 46 69 6c 65 44 65 73 63 ias MapiFileDesc 0bd0: 2a 20 6c 70 4d 61 70 69 46 69 6c 65 44 65 73 63 * lpMapiFileDesc 0be0: 3b 0d 0a 0d 0a 73 74 72 75 63 74 20 4d 61 70 69 ;....struct Mapi 0bf0: 46 69 6c 65 54 61 67 45 78 74 20 7b 0d 0a 09 55 FileTagExt {...U 0c00: 4c 4f 4e 47 20 20 75 6c 52 65 73 65 72 76 65 64 LONG ulReserved 0c10: 3b 0d 0a 09 55 4c 4f 4e 47 20 20 63 62 54 61 67 ;...ULONG cbTag 0c20: 3b 0d 0a 09 4c 50 42 59 54 45 20 6c 70 54 61 67 ;...LPBYTE lpTag 0c30: 3b 0d 0a 09 55 4c 4f 4e 47 20 20 63 62 45 6e 63 ;...ULONG cbEnc 0c40: 6f 64 69 6e 67 3b 0d 0a 09 4c 50 42 59 54 45 20 oding;...LPBYTE 0c50: 6c 70 45 6e 63 6f 64 69 6e 67 3b 0d 0a 7d 0d 0a lpEncoding;..}.. 0c60: 61 6c 69 61 73 20 4d 61 70 69 46 69 6c 65 54 61 alias MapiFileTa 0c70: 67 45 78 74 2a 20 6c 70 4d 61 70 69 46 69 6c 65 gExt* lpMapiFile 0c80: 54 61 67 45 78 74 3b 0d 0a 0d 0a 73 74 72 75 63 TagExt;....struc 0c90: 74 20 4d 61 70 69 4d 65 73 73 61 67 65 20 7b 0d t MapiMessage {. 0ca0: 0a 09 55 4c 4f 4e 47 20 20 20 20 20 20 20 20 20 ..ULONG 0cb0: 20 20 75 6c 52 65 73 65 72 76 65 64 3b 0d 0a 09 ulReserved;... 0cc0: 4c 50 53 54 52 20 20 20 20 20 20 20 20 20 20 20 LPSTR 0cd0: 6c 70 73 7a 53 75 62 6a 65 63 74 3b 0d 0a 09 4c lpszSubject;...L 0ce0: 50 53 54 52 20 20 20 20 20 20 20 20 20 20 20 6c PSTR l 0cf0: 70 73 7a 4e 6f 74 65 54 65 78 74 3b 0d 0a 09 4c pszNoteText;...L 0d00: 50 53 54 52 20 20 20 20 20 20 20 20 20 20 20 6c PSTR l 0d10: 70 73 7a 4d 65 73 73 61 67 65 54 79 70 65 3b 0d pszMessageType;. 0d20: 0a 09 4c 50 53 54 52 20 20 20 20 20 20 20 20 20 ..LPSTR 0d30: 20 20 6c 70 73 7a 44 61 74 65 52 65 63 65 69 76 lpszDateReceiv 0d40: 65 64 3b 0d 0a 09 4c 50 53 54 52 20 20 20 20 20 ed;...LPSTR 0d50: 20 20 20 20 20 20 6c 70 73 7a 43 6f 6e 76 65 72 lpszConver 0d60: 73 61 74 69 6f 6e 49 44 3b 0d 0a 09 46 4c 41 47 sationID;...FLAG 0d70: 53 20 20 20 20 20 20 20 20 20 20 20 66 6c 46 6c S flFl 0d80: 61 67 73 3b 0d 0a 09 6c 70 4d 61 70 69 52 65 63 ags;...lpMapiRec 0d90: 69 70 44 65 73 63 20 6c 70 4f 72 69 67 69 6e 61 ipDesc lpOrigina 0da0: 74 6f 72 3b 0d 0a 09 55 4c 4f 4e 47 20 20 20 20 tor;...ULONG 0db0: 20 20 20 20 20 20 20 6e 52 65 63 69 70 43 6f 75 nRecipCou 0dc0: 6e 74 3b 0d 0a 09 6c 70 4d 61 70 69 52 65 63 69 nt;...lpMapiReci 0dd0: 70 44 65 73 63 20 6c 70 52 65 63 69 70 73 3b 0d pDesc lpRecips;. 0de0: 0a 09 55 4c 4f 4e 47 20 20 20 20 20 20 20 20 20 ..ULONG 0df0: 20 20 6e 46 69 6c 65 43 6f 75 6e 74 3b 0d 0a 09 nFileCount;... 0e00: 6c 70 4d 61 70 69 46 69 6c 65 44 65 73 63 20 20 lpMapiFileDesc 0e10: 6c 70 46 69 6c 65 73 3b 0d 0a 7d 0d 0a 61 6c 69 lpFiles;..}..ali 0e20: 61 73 20 4d 61 70 69 4d 65 73 73 61 67 65 2a 20 as MapiMessage* 0e30: 6c 70 4d 61 70 69 4d 65 73 73 61 67 65 3b 0d 0a lpMapiMessage;.. 0e40: 0d 0a 65 78 74 65 72 6e 20 28 50 61 73 63 61 6c ..extern (Pascal 0e50: 29 20 7b 0d 0a 09 55 4c 4f 4e 47 20 4d 41 50 49 ) {...ULONG MAPI 0e60: 4c 6f 67 6f 6e 28 55 4c 4f 4e 47 2c 20 4c 50 53 Logon(ULONG, LPS 0e70: 54 52 2c 20 4c 50 53 54 52 2c 20 46 4c 41 47 53 TR, LPSTR, FLAGS 0e80: 2c 20 55 4c 4f 4e 47 2c 20 4c 50 4c 48 41 4e 44 , ULONG, LPLHAND 0e90: 4c 45 29 3b 0d 0a 09 55 4c 4f 4e 47 20 4d 41 50 LE);...ULONG MAP 0ea0: 49 53 65 6e 64 4d 61 69 6c 28 4c 48 41 4e 44 4c ISendMail(LHANDL 0eb0: 45 2c 20 55 4c 4f 4e 47 2c 20 6c 70 4d 61 70 69 E, ULONG, lpMapi 0ec0: 4d 65 73 73 61 67 65 2c 20 46 4c 41 47 53 2c 20 Message, FLAGS, 0ed0: 55 4c 4f 4e 47 29 3b 0d 0a 09 55 4c 4f 4e 47 20 ULONG);...ULONG 0ee0: 4d 41 50 49 53 65 6e 64 44 6f 63 75 6d 65 6e 74 MAPISendDocument 0ef0: 73 28 55 4c 4f 4e 47 2c 20 4c 50 53 54 52 2c 20 s(ULONG, LPSTR, 0f00: 4c 50 53 54 52 2c 20 4c 50 53 54 52 2c 20 55 4c LPSTR, LPSTR, UL 0f10: 4f 4e 47 29 3b 0d 0a 09 55 4c 4f 4e 47 20 4d 41 ONG);...ULONG MA 0f20: 50 49 52 65 61 64 4d 61 69 6c 28 4c 48 41 4e 44 PIReadMail(LHAND 0f30: 4c 45 2c 20 55 4c 4f 4e 47 2c 20 4c 50 53 54 52 LE, ULONG, LPSTR 0f40: 2c 20 46 4c 41 47 53 2c 20 55 4c 4f 4e 47 2c 20 , FLAGS, ULONG, 0f50: 6c 70 4d 61 70 69 4d 65 73 73 61 67 65 2a 29 3b lpMapiMessage*); 0f60: 0d 0a 09 55 4c 4f 4e 47 20 4d 41 50 49 46 69 6e ...ULONG MAPIFin 0f70: 64 4e 65 78 74 28 4c 48 41 4e 44 4c 45 2c 20 55 dNext(LHANDLE, U 0f80: 4c 4f 4e 47 2c 20 4c 50 53 54 52 2c 20 4c 50 53 LONG, LPSTR, LPS 0f90: 54 52 2c 20 46 4c 41 47 53 2c 20 55 4c 4f 4e 47 TR, FLAGS, ULONG 0fa0: 2c 20 4c 50 53 54 52 29 3b 0d 0a 09 55 4c 4f 4e , LPSTR);...ULON 0fb0: 47 20 4d 41 50 49 52 65 73 6f 6c 76 65 4e 61 6d G MAPIResolveNam 0fc0: 65 28 4c 48 41 4e 44 4c 45 2c 20 55 4c 4f 4e 47 e(LHANDLE, ULONG 0fd0: 2c 20 4c 50 53 54 52 2c 20 46 4c 41 47 53 2c 20 , LPSTR, FLAGS, 0fe0: 55 4c 4f 4e 47 2c 0d 0a 09 20 20 6c 70 4d 61 70 ULONG,... lpMap 0ff0: 69 52 65 63 69 70 44 65 73 63 2a 29 3b 0d 0a 09 iRecipDesc*);... 1000: 55 4c 4f 4e 47 20 4d 41 50 49 41 64 64 72 65 73 ULONG MAPIAddres 1010: 73 28 4c 48 41 4e 44 4c 45 2c 20 55 4c 4f 4e 47 s(LHANDLE, ULONG 1020: 2c 20 4c 50 53 54 52 2c 20 55 4c 4f 4e 47 2c 20 , LPSTR, ULONG, 1030: 4c 50 53 54 52 2c 20 55 4c 4f 4e 47 2c 0d 0a 09 LPSTR, ULONG,... 1040: 20 20 6c 70 4d 61 70 69 52 65 63 69 70 44 65 73 lpMapiRecipDes 1050: 63 2c 20 46 4c 41 47 53 2c 20 55 4c 4f 4e 47 2c c, FLAGS, ULONG, 1060: 20 4c 50 55 4c 4f 4e 47 2c 20 6c 70 4d 61 70 69 LPULONG, lpMapi 1070: 52 65 63 69 70 44 65 73 63 2a 29 3b 0d 0a 09 55 RecipDesc*);...U 1080: 4c 4f 4e 47 20 4d 41 50 49 46 72 65 65 42 75 66 LONG MAPIFreeBuf 1090: 66 65 72 28 4c 50 56 4f 49 44 29 3b 0d 0a 09 55 fer(LPVOID);...U 10a0: 4c 4f 4e 47 20 4d 41 50 49 44 65 74 61 69 6c 73 LONG MAPIDetails 10b0: 28 4c 48 41 4e 44 4c 45 2c 20 55 4c 4f 4e 47 2c (LHANDLE, ULONG, 10c0: 20 6c 70 4d 61 70 69 52 65 63 69 70 44 65 73 63 lpMapiRecipDesc 10d0: 2c 20 46 4c 41 47 53 2c 20 55 4c 4f 4e 47 29 3b , FLAGS, ULONG); 10e0: 0d 0a 09 55 4c 4f 4e 47 20 4d 41 50 49 53 61 76 ...ULONG MAPISav 10f0: 65 4d 61 69 6c 28 4c 48 41 4e 44 4c 45 2c 20 55 eMail(LHANDLE, U 1100: 4c 4f 4e 47 2c 20 6c 70 4d 61 70 69 4d 65 73 73 LONG, lpMapiMess 1110: 61 67 65 20 6c 70 73 7a 4d 65 73 73 61 67 65 2c age lpszMessage, 1120: 20 46 4c 41 47 53 2c 0d 0a 09 20 20 55 4c 4f 4e FLAGS,... ULON 1130: 47 2c 20 4c 50 53 54 52 29 3b 0d 0a 09 55 4c 4f G, LPSTR);...ULO 1140: 4e 47 20 4d 41 50 49 44 65 6c 65 74 65 4d 61 69 NG MAPIDeleteMai 1150: 6c 28 4c 48 41 4e 44 4c 45 20 6c 70 53 65 73 73 l(LHANDLE lpSess 1160: 69 6f 6e 2c 20 55 4c 4f 4e 47 2c 20 4c 50 53 54 ion, ULONG, LPST 1170: 52 2c 20 46 4c 41 47 53 2c 20 55 4c 4f 4e 47 29 R, FLAGS, ULONG) 1180: 3b 0d 0a 09 55 4c 4f 4e 47 20 4d 41 50 49 4c 6f ;...ULONG MAPILo 1190: 67 6f 66 66 28 4c 48 41 4e 44 4c 45 2c 20 55 4c goff(LHANDLE, UL 11a0: 4f 4e 47 2c 20 46 4c 41 47 53 2c 20 55 4c 4f 4e ONG, FLAGS, ULON 11b0: 47 29 3b 0d 0a 09 2f 2f 20 4e 65 74 73 63 61 70 G);...// Netscap 11c0: 65 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 09 55 e extensions...U 11d0: 4c 4f 4e 47 20 4d 41 50 49 47 65 74 4e 65 74 73 LONG MAPIGetNets 11e0: 63 61 70 65 56 65 72 73 69 6f 6e 28 29 3b 0d 0a capeVersion();.. 11f0: 09 55 4c 4f 4e 47 20 4d 41 50 49 5f 4e 53 43 50 .ULONG MAPI_NSCP 1200: 5f 53 79 6e 63 68 72 6f 6e 69 7a 65 43 6c 69 65 _SynchronizeClie 1210: 6e 74 28 4c 48 41 4e 44 4c 45 2c 20 55 4c 4f 4e nt(LHANDLE, ULON 1220: 47 29 3b 0d 0a 0d 0a 09 2f 2f 20 48 61 6e 64 6c G);.....// Handl 1230: 65 73 20 66 6f 72 20 75 73 65 20 77 69 74 68 20 es for use with 1240: 47 65 74 50 72 6f 63 41 64 64 72 65 73 73 0d 0a GetProcAddress.. 1250: 09 61 6c 69 61 73 20 55 4c 4f 4e 47 20 66 75 6e .alias ULONG fun 1260: 63 74 69 6f 6e 28 55 4c 4f 4e 47 2c 20 4c 50 53 ction(ULONG, LPS 1270: 54 52 2c 20 4c 50 53 54 52 2c 20 46 4c 41 47 53 TR, LPSTR, FLAGS 1280: 2c 20 55 4c 4f 4e 47 2c 20 4c 50 4c 48 41 4e 44 , ULONG, LPLHAND 1290: 4c 45 29 0d 0a 09 20 20 4c 50 4d 41 50 49 4c 4f LE)... LPMAPILO 12a0: 47 4f 4e 3b 0d 0a 09 61 6c 69 61 73 20 55 4c 4f GON;...alias ULO 12b0: 4e 47 20 66 75 6e 63 74 69 6f 6e 28 4c 48 41 4e NG function(LHAN 12c0: 44 4c 45 2c 20 55 4c 4f 4e 47 2c 20 6c 70 4d 61 DLE, ULONG, lpMa 12d0: 70 69 4d 65 73 73 61 67 65 2c 20 46 4c 41 47 53 piMessage, FLAGS 12e0: 2c 20 55 4c 4f 4e 47 29 0d 0a 09 20 20 4c 50 4d , ULONG)... LPM 12f0: 41 50 49 53 45 4e 44 4d 41 49 4c 3b 0d 0a 09 61 APISENDMAIL;...a 1300: 6c 69 61 73 20 55 4c 4f 4e 47 20 66 75 6e 63 74 lias ULONG funct 1310: 69 6f 6e 28 55 4c 4f 4e 47 2c 20 4c 50 53 54 52 ion(ULONG, LPSTR 1320: 2c 20 4c 50 53 54 52 2c 20 4c 50 53 54 52 2c 20 , LPSTR, LPSTR, 1330: 55 4c 4f 4e 47 29 0d 0a 09 20 20 4c 50 4d 41 50 ULONG)... LPMAP 1340: 49 53 45 4e 44 44 4f 43 55 4d 45 4e 54 53 3b 0d ISENDDOCUMENTS;. 1350: 0a 09 61 6c 69 61 73 20 55 4c 4f 4e 47 20 66 75 ..alias ULONG fu 1360: 6e 63 74 69 6f 6e 28 4c 48 41 4e 44 4c 45 2c 20 nction(LHANDLE, 1370: 55 4c 4f 4e 47 2c 20 4c 50 53 54 52 2c 20 46 4c ULONG, LPSTR, FL 1380: 41 47 53 2c 20 55 4c 4f 4e 47 2c 20 6c 70 4d 61 AGS, ULONG, lpMa 1390: 70 69 4d 65 73 73 61 67 65 2a 29 0d 0a 09 20 20 piMessage*)... 13a0: 4c 50 4d 41 50 49 52 45 41 44 4d 41 49 4c 3b 0d LPMAPIREADMAIL;. 13b0: 0a 09 61 6c 69 61 73 20 55 4c 4f 4e 47 20 66 75 ..alias ULONG fu 13c0: 6e 63 74 69 6f 6e 28 4c 48 41 4e 44 4c 45 2c 20 nction(LHANDLE, 13d0: 55 4c 4f 4e 47 2c 20 4c 50 53 54 52 2c 20 4c 50 ULONG, LPSTR, LP 13e0: 53 54 52 2c 20 46 4c 41 47 53 2c 20 55 4c 4f 4e STR, FLAGS, ULON 13f0: 47 2c 20 4c 50 53 54 52 29 0d 0a 09 20 20 4c 50 G, LPSTR)... LP 1400: 4d 41 50 49 46 49 4e 44 4e 45 58 54 3b 0d 0a 09 MAPIFINDNEXT;... 1410: 61 6c 69 61 73 20 55 4c 4f 4e 47 20 66 75 6e 63 alias ULONG func 1420: 74 69 6f 6e 28 4c 48 41 4e 44 4c 45 2c 20 55 4c tion(LHANDLE, UL 1430: 4f 4e 47 2c 20 4c 50 53 54 52 2c 20 46 4c 41 47 ONG, LPSTR, FLAG 1440: 53 2c 20 55 4c 4f 4e 47 2c 0d 0a 09 20 20 6c 70 S, ULONG,... lp 1450: 4d 61 70 69 52 65 63 69 70 44 65 73 63 2a 29 20 MapiRecipDesc*) 1460: 4c 50 4d 41 50 49 52 45 53 4f 4c 56 45 4e 41 4d LPMAPIRESOLVENAM 1470: 45 3b 0d 0a 09 61 6c 69 61 73 20 55 4c 4f 4e 47 E;...alias ULONG 1480: 20 66 75 6e 63 74 69 6f 6e 28 4c 48 41 4e 44 4c function(LHANDL 1490: 45 2c 20 55 4c 4f 4e 47 2c 20 4c 50 53 54 52 2c E, ULONG, LPSTR, 14a0: 20 55 4c 4f 4e 47 2c 20 4c 50 53 54 52 2c 20 55 ULONG, LPSTR, U 14b0: 4c 4f 4e 47 2c 0d 0a 09 20 20 6c 70 4d 61 70 69 LONG,... lpMapi 14c0: 52 65 63 69 70 44 65 73 63 2c 20 46 4c 41 47 53 RecipDesc, FLAGS 14d0: 2c 20 55 4c 4f 4e 47 2c 20 4c 50 55 4c 4f 4e 47 , ULONG, LPULONG 14e0: 2c 20 6c 70 4d 61 70 69 52 65 63 69 70 44 65 73 , lpMapiRecipDes 14f0: 63 2a 29 20 4c 50 4d 41 50 49 41 44 44 52 45 53 c*) LPMAPIADDRES 1500: 53 3b 0d 0a 09 61 6c 69 61 73 20 55 4c 4f 4e 47 S;...alias ULONG 1510: 20 66 75 6e 63 74 69 6f 6e 28 4c 50 56 4f 49 44 function(LPVOID 1520: 20 6c 70 76 29 20 4c 50 4d 41 50 49 46 52 45 45 lpv) LPMAPIFREE 1530: 42 55 46 46 45 52 3b 0d 0a 09 61 6c 69 61 73 20 BUFFER;...alias 1540: 55 4c 4f 4e 47 20 66 75 6e 63 74 69 6f 6e 28 4c ULONG function(L 1550: 48 41 4e 44 4c 45 2c 20 55 4c 4f 4e 47 2c 20 6c HANDLE, ULONG, l 1560: 70 4d 61 70 69 52 65 63 69 70 44 65 73 63 2c 20 pMapiRecipDesc, 1570: 46 4c 41 47 53 2c 20 55 4c 4f 4e 47 29 0d 0a 09 FLAGS, ULONG)... 1580: 20 20 4c 50 4d 41 50 49 44 45 54 41 49 4c 53 3b LPMAPIDETAILS; 1590: 0d 0a 09 61 6c 69 61 73 20 55 4c 4f 4e 47 20 66 ...alias ULONG f 15a0: 75 6e 63 74 69 6f 6e 28 4c 48 41 4e 44 4c 45 2c unction(LHANDLE, 15b0: 20 55 4c 4f 4e 47 2c 20 6c 70 4d 61 70 69 4d 65 ULONG, lpMapiMe 15c0: 73 73 61 67 65 2c 20 46 4c 41 47 53 2c 20 55 4c ssage, FLAGS, UL 15d0: 4f 4e 47 2c 20 4c 50 53 54 52 29 0d 0a 09 20 20 ONG, LPSTR)... 15e0: 4c 50 4d 41 50 49 53 41 56 45 4d 41 49 4c 3b 0d LPMAPISAVEMAIL;. 15f0: 0a 09 61 6c 69 61 73 20 55 4c 4f 4e 47 20 66 75 ..alias ULONG fu 1600: 6e 63 74 69 6f 6e 28 4c 48 41 4e 44 4c 45 20 6c nction(LHANDLE l 1610: 70 53 65 73 73 69 6f 6e 2c 20 55 4c 4f 4e 47 2c pSession, ULONG, 1620: 20 4c 50 53 54 52 2c 20 46 4c 41 47 53 2c 20 55 LPSTR, FLAGS, U 1630: 4c 4f 4e 47 29 0d 0a 09 20 20 4c 50 4d 41 50 49 LONG)... LPMAPI 1640: 44 45 4c 45 54 45 4d 41 49 4c 3b 0d 0a 09 61 6c DELETEMAIL;...al 1650: 69 61 73 20 55 4c 4f 4e 47 20 66 75 6e 63 74 69 ias ULONG functi 1660: 6f 6e 28 4c 48 41 4e 44 4c 45 2c 20 55 4c 4f 4e on(LHANDLE, ULON 1670: 47 2c 20 46 4c 41 47 53 2c 20 55 4c 4f 4e 47 29 G, FLAGS, ULONG) 1680: 20 4c 50 4d 41 50 49 4c 4f 47 4f 46 46 3b 0d 0a LPMAPILOGOFF;.. 1690: 7d 0d 0a }..