home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / w / wa0729.zip / GLOBAL.BAS < prev    next >
BASIC Source File  |  1992-11-11  |  6KB  |  141 lines

  1. 'Global Const TRUE = -1
  2. 'Global Const FALSE = 0
  3.  
  4. '****************************************************************************'
  5. '                                                                            '
  6. ' Visual Basic declaration for the MAPI functions.                           '
  7. ' This file can be loaded into the global module.                            '
  8. '                                                                            '                                                                           '
  9. '****************************************************************************'
  10.  
  11.  
  12. '***************************************************
  13. '   MAPI Message holds information about a message
  14. '***************************************************
  15.  
  16. Type MAPIMessage
  17.     Reserved As Long
  18.     Subject As String
  19.     NoteText As String
  20.     MessageType As String
  21.     DateReceived As String
  22.     ConversationID As String
  23.     Flags As Long
  24.     RecipCount As Long
  25.     FileCount As Long
  26. End Type
  27.  
  28.  
  29. '************************************************
  30. '   MAPIRecip holds information about a message
  31. '   originator or recipient
  32. '************************************************
  33.  
  34. Type MapiRecip
  35.     Reserved As Long
  36.     RecipClass As Long
  37.     Name As String
  38.     Address As String
  39.     EIDSize As Long
  40.     EntryID As String
  41. End Type
  42.  
  43.  
  44. '******************************************************
  45. '   MapiFile holds information about file attachments
  46. '******************************************************
  47.  
  48. Type MapiFile
  49.     Reserved As Long
  50.     Flags As Long
  51.     Position As Long
  52.     PathName As String
  53.     FileName As String
  54.     FileType As String
  55. End Type
  56.  
  57.  
  58. '***************************
  59. '   FUNCTION Declarations
  60. '***************************
  61.  
  62. Declare Function MAPILogon Lib "MAPI.DLL" (ByVal UIParam&, ByVal User$, ByVal Password$, ByVal Flags&, ByVal Reserved&, Session&) As Long
  63. Declare Function MAPILogoff Lib "MAPI.DLL" (ByVal Session&, ByVal UIParam&, ByVal Flags&, ByVal Reserved&) As Long
  64. Declare Function BMAPIReadMail Lib "MAPI.DLL" (lMsg&, nRecipients&, nFiles&, ByVal Session&, ByVal UIParam&, MessageID$, ByVal Flag&, ByVal Reserved&) As Long
  65. Declare Function BMAPIGetReadMail Lib "MAPI.DLL" (ByVal lMsg&, Message As MAPIMessage, Recip As MapiRecip, File As MapiFile, Originator As MapiRecip) As Long
  66. Declare Function MAPIFindNext Lib "MAPI.DLL" Alias "BMAPIFindNext" (ByVal Session&, ByVal UIParam&, MsgType$, SeedMsgID$, ByVal Flag&, ByVal Reserved&, MsgId$) As Long
  67. Declare Function MAPISendDocuments Lib "MAPI.DLL" (ByVal UIParam&, ByVal DelimStr$, ByVal FilePaths$, ByVal FileNames$, ByVal Reserved&) As Long
  68. Declare Function MAPIDeleteMail Lib "MAPI.DLL" (ByVal Session&, ByVal UIParam&, ByVal MsgId$, ByVal Flags&, ByVal Reserved&) As Long
  69. Declare Function MAPISendMail Lib "MAPI.DLL" Alias "BMAPISendMail" (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient As MapiRecip, File As MapiFile, ByVal Flags&, ByVal Reserved&) As Long
  70. Declare Function MAPISaveMail Lib "MAPI.DLL" Alias "BMAPISaveMail" (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient As MapiRecip, File As MapiFile, ByVal Flags&, ByVal Reserved&, MsgId$) As Long
  71. Declare Function BMAPIAddress Lib "MAPI.DLL" (lInfo&, ByVal Session&, ByVal UIParam&, Caption$, ByVal nEditFields&, Label$, nRecipients&, Recip As MapiRecip, ByVal Flags&, ByVal Reserved&) As Long
  72. Declare Function BMAPIGetAddress Lib "MAPI.DLL" (ByVal lInfo&, ByVal nRecipients&, Recipients As MapiRecip) As Long
  73. Declare Function MapiDetails Lib "MAPI.DLL" Alias "BMAPIDetails" (ByVal Session&, ByVal UIParam&, Recipient As MapiRecip, ByVal Flags&, ByVal Reserved&) As Long
  74. Declare Function MapiResolveName Lib "MAPI.DLL" Alias "BMAPIResolveName" (ByVal Session&, ByVal UIParam&, ByVal UserName$, ByVal Flags&, ByVal Reserved&, Recipient As MapiRecip) As Long
  75.  
  76.  
  77.  
  78. '**************************
  79. '   CONSTANT Declarations
  80. '**************************
  81. '
  82.  
  83. Global Const SUCCESS_SUCCESS = 0
  84. Global Const MAPI_USER_ABORT = 1
  85. Global Const MAPI_E_FAILURE = 2
  86. Global Const MAPI_E_LOGIN_FAILURE = 3
  87. Global Const MAPI_E_DISK_FULL = 4
  88. Global Const MAPI_E_INSUFFICIENT_MEMORY = 5
  89. Global Const MAPI_E_BLK_TOO_SMALL = 6
  90. Global Const MAPI_E_TOO_MANY_SESSIONS = 8
  91. Global Const MAPI_E_TOO_MANY_FILES = 9
  92. Global Const MAPI_E_TOO_MANY_RECIPIENTS = 10
  93. Global Const MAPI_E_ATTACHMENT_NOT_FOUND = 11
  94. Global Const MAPI_E_ATTACHMENT_OPEN_FAILURE = 12
  95. Global Const MAPI_E_ATTACHMENT_WRITE_FAILURE = 13
  96. Global Const MAPI_E_UNKNOWN_RECIPIENT = 14
  97. Global Const MAPI_E_BAD_RECIPTYPE = 15
  98. Global Const MAPI_E_NO_MESSAGES = 16
  99. Global Const MAPI_E_INVALID_MESSAGE = 17
  100. Global Const MAPI_E_TEXT_TOO_LARGE = 18
  101. Global Const MAPI_E_INVALID_SESSION = 19
  102. Global Const MAPI_E_TYPE_NOT_SUPPORTED = 20
  103. Global Const MAPI_E_AMBIGUOUS_RECIPIENT = 21
  104.  
  105. Global Const MAPI_ORIG = 0
  106. Global Const MAPI_TO = 1
  107. Global Const MAPI_CC = 2
  108. Global Const MAPI_BCC = 3
  109.  
  110.  
  111. '***********************
  112. '   FLAG Declarations
  113. '***********************
  114.  
  115. Global Const MAPI_LOGON_UI = &H1
  116. Global Const MAPI_NEW_SESSION = &H2
  117. Global Const MAPI_DIALOG = &H8
  118. Global Const MAPI_UNREAD_ONLY = &H20
  119. Global Const MAPI_ENVELOPE_ONLY = &H40
  120. Global Const MAPI_PEEK = &H80
  121. Global Const MAPI_GUARANTEE_FIFO = &H100
  122. Global Const MAPI_BODY_AS_FILE = &H200
  123. Global Const MAPI_AB_NOMODIFY = &H400
  124. Global Const MAPI_SUPPRESS_ATTACH = &H800
  125. Global Const MAPI_FORCE_DOWNLOAD = &H1000
  126.  
  127. Global Const MAPI_OLE = &H1
  128. Global Const MAPI_OLE_STATIC = &H2
  129.  
  130.  
  131. '*****************************************
  132. ' Global variables used by MapiDemo only
  133. '*****************************************
  134.  
  135. Global MapiSession&
  136. Global rc As Long
  137. Global MsgId$
  138. Global Recips() As MapiRecip, Files() As MapiFile
  139. Global PopupErrors As Integer
  140.  
  141.