home *** CD-ROM | disk | FTP | other *** search
/ distrib.akp.su/Programming/Vb-6+Rus/ / distrib.akp.su.tar / distrib.akp.su / Programming / Vb-6+Rus / COMMON / TOOLS / WINAPI / MAPI32.TXT < prev    next >
Text File  |  1998-06-18  |  6KB  |  170 lines

  1. ' ------------------------------------------------------------------------
  2. '
  3. '    MAPI32.TXT -- MAPI32 API Declarations for Visual Basic
  4. '
  5. '              Copyright (C) 1994-98 Microsoft Corporation
  6. '
  7. '
  8. '  This file contains only the Const, Type,
  9. '  and Declare statements for  MAPI32 APIs.
  10. '
  11. '  You have a royalty-free right to use, modify, reproduce and distribute
  12. '  this file (and/or any modified version) in any way you find useful,
  13. '  provided that you agree that Microsoft has no warranty, obligation or
  14. '  liability for its contents.  
  15. '
  16. ' ------------------------------------------------------------------------
  17.  
  18. '***************************************************
  19. '   MAPI Message holds information about a message
  20. '***************************************************
  21.  
  22. Type MAPIMessage
  23.     Reserved As Long
  24.     Subject As String
  25.     NoteText As String
  26.     MessageType As String
  27.     DateReceived As String
  28.     ConversationID As String
  29.     Flags As Long
  30.     RecipCount As Long
  31.     FileCount As Long
  32. End Type
  33.  
  34.  
  35. '************************************************
  36. '   MAPIRecip holds information about a message
  37. '   originator or recipient
  38. '************************************************
  39.  
  40. Type MapiRecip
  41.     Reserved As Long
  42.     RecipClass As Long
  43.     Name As String
  44.     Address As String
  45.     EIDSize As Long
  46.     EntryID As String
  47. End Type
  48.  
  49.  
  50. '******************************************************
  51. '   MapiFile holds information about file attachments
  52. '******************************************************
  53.  
  54. Type MapiFile
  55.     Reserved As Long
  56.     Flags As Long
  57.     Position As Long
  58.     PathName As String
  59.     FileName As String
  60.     FileType As String
  61. End Type
  62.  
  63.  
  64. '***************************
  65. '   FUNCTION Declarations
  66. '***************************
  67.  
  68. Declare Function MAPILogon Lib "MAPI32.DLL" (ByVal UIParam&, ByVal User$, ByVal Password$, ByVal Flags&, ByVal Reserved&, Session&) As Long
  69. Declare Function MAPILogoff Lib "MAPI32.DLL" (ByVal Session&, ByVal UIParam&, ByVal Flags&, ByVal Reserved&) As Long
  70. Declare Function BMAPIReadMail Lib "MAPI32.DLL" (lMsg&, nRecipients&, nFiles&, ByVal Session&, ByVal UIParam&, MessageID$, ByVal Flag&, ByVal Reserved&) As Long
  71. Declare Function BMAPIGetReadMail Lib "MAPI32.DLL" (ByVal lMsg&, Message As MAPIMessage, Recip() As MapiRecip, File() As MapiFile, Originator As MapiRecip) As Long
  72. Declare Function MAPIFindNext Lib "MAPI32.DLL" Alias "BMAPIFindNext" (ByVal Session&, ByVal UIParam&, MsgType$, SeedMsgID$, ByVal Flag&, ByVal Reserved&, MsgID$) As Long
  73. Declare Function MAPISendDocuments Lib "MAPI32.DLL" (ByVal UIParam&, ByVal DelimStr$, ByVal FilePaths$, ByVal FileNames$, ByVal Reserved&) As Long
  74. Declare Function MAPIDeleteMail Lib "MAPI32.DLL" (ByVal Session&, ByVal UIParam&, ByVal MsgID$, ByVal Flags&, ByVal Reserved&) As Long
  75. Declare Function MAPISendMail Lib "MAPI32.DLL" Alias "BMAPISendMail" (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient() As MapiRecip, File() As MapiFile, ByVal Flags&, ByVal Reserved&) As Long
  76. Declare Function MAPISaveMail Lib "MAPI32.DLL" Alias "BMAPISaveMail" (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient() As MapiRecip, File() As MapiFile, ByVal Flags&, ByVal Reserved&, MsgID$) As Long
  77. Declare Function BMAPIAddress Lib "MAPI32.DLL" (lInfo&, ByVal Session&, ByVal UIParam&, Caption$, ByVal nEditFields&, Label$, nRecipients&, Recip() As MapiRecip, ByVal Flags&, ByVal Reserved&) As Long
  78. Declare Function BMAPIGetAddress Lib "MAPI32.DLL" (ByVal lInfo&, ByVal nRecipients&, Recipients() As MapiRecip) As Long
  79. Declare Function MAPIDetails Lib "MAPI32.DLL" Alias "BMAPIDetails" (ByVal Session&, ByVal UIParam&, Recipient As MapiRecip, ByVal Flags&, ByVal Reserved&) As Long
  80. Declare Function MAPIResolveName Lib "MAPI32.DLL" Alias "BMAPIResolveName" (ByVal Session&, ByVal UIParam&, ByVal UserName$, ByVal Flags&, ByVal Reserved&, Recipient As MapiRecip) As Long
  81.  
  82.  
  83.  
  84. '**************************
  85. '   CONSTANT Declarations
  86. '**************************
  87. '
  88.  
  89. Const SUCCESS_SUCCESS = 0
  90. Const MAPI_USER_ABORT = 1
  91. Const MAPI_E_USER_ABORT = MAPI_USER_ABORT
  92. Const MAPI_E_FAILURE = 2
  93. Const MAPI_E_LOGIN_FAILURE = 3
  94. Const MAPI_E_LOGON_FAILURE = MAPI_E_LOGIN_FAILURE
  95. Const MAPI_E_DISK_FULL = 4
  96. Const MAPI_E_INSUFFICIENT_MEMORY = 5
  97. Const MAPI_E_BLK_TOO_SMALL = 6
  98. Const MAPI_E_TOO_MANY_SESSIONS = 8
  99. Const MAPI_E_TOO_MANY_FILES = 9
  100. Const MAPI_E_TOO_MANY_RECIPIENTS = 10
  101. Const MAPI_E_ATTACHMENT_NOT_FOUND = 11
  102. Const MAPI_E_ATTACHMENT_OPEN_FAILURE = 12
  103. Const MAPI_E_ATTACHMENT_WRITE_FAILURE = 13
  104. Const MAPI_E_UNKNOWN_RECIPIENT = 14
  105. Const MAPI_E_BAD_RECIPTYPE = 15
  106. Const MAPI_E_NO_MESSAGES = 16
  107. Const MAPI_E_INVALID_MESSAGE = 17
  108. Const MAPI_E_TEXT_TOO_LARGE = 18
  109. Const MAPI_E_INVALID_SESSION = 19
  110. Const MAPI_E_TYPE_NOT_SUPPORTED = 20
  111. Const MAPI_E_AMBIGUOUS_RECIPIENT = 21
  112. Const MAPI_E_AMBIG_RECIP = MAPI_E_AMBIGUOUS_RECIPIENT
  113. Const MAPI_E_MESSAGE_IN_USE = 22
  114. Const MAPI_E_NETWORK_FAILURE = 23
  115. Const MAPI_E_INVALID_EDITFIELDS = 24
  116. Const MAPI_E_INVALID_RECIPS = 25
  117. Const MAPI_E_NOT_SUPPORTED = 26
  118.  
  119. Const MAPI_ORIG = 0
  120. Const MAPI_TO = 1
  121. Const MAPI_CC = 2
  122. Const MAPI_BCC = 3
  123.  
  124.  
  125. '***********************
  126. '   FLAG Declarations
  127. '***********************
  128.  
  129. '* MAPILogon() flags *
  130.  
  131. Const MAPI_LOGON_UI = &H1
  132. Const MAPI_NEW_SESSION = &H2
  133. Const MAPI_FORCE_DOWNLOAD = &H1000
  134.  
  135. '* MAPILogoff() flags *
  136.  
  137. Const MAPI_LOGOFF_SHARED = &H1
  138. Const MAPI_LOGOFF_UI = &H2
  139.  
  140. '* MAPISendMail() flags *
  141.  
  142. Const MAPI_DIALOG = &H8
  143.  
  144. '* MAPIFindNext() flags *
  145.  
  146. Const MAPI_UNREAD_ONLY = &H20
  147. Const MAPI_GUARANTEE_FIFO = &H100
  148.  
  149. '* MAPIReadMail() flags *
  150.  
  151. Const MAPI_ENVELOPE_ONLY = &H40
  152. Const MAPI_PEEK = &H80
  153. Const MAPI_BODY_AS_FILE = &H200
  154. Const MAPI_SUPPRESS_ATTACH = &H800
  155.  
  156. '* MAPIDetails() flags *
  157.  
  158. Const MAPI_AB_NOMODIFY = &H400
  159.  
  160. '* Attachment flags *
  161.  
  162. Const MAPI_OLE = &H1
  163. Const MAPI_OLE_STATIC = &H2
  164.  
  165. '* MapiMessage flags *
  166.  
  167. Const MAPI_UNREAD = &H1
  168. Const MAPI_RECEIPT_REQUESTED = &H2
  169. Const MAPI_SENT = &H4
  170.