Unit MapiSpi

++ m a p i s p i . p a s Abstract: Automatic conversion of mapispi.h. Comments: This source file automatically converted by htrans 0.91 beta 1 Copyright (c) 1997 Alexander Staubo Revision history: 18-06-1997 20:53 alex [Autogenerated] 18-06-1997 20:53 alex Retouched for release --

Classes

IABLogon - For GetOneOffTable() } {***** MAPI_UNICODE ((ULONG) 0x80000000)
IABProvider -
IMAPISupport - Function pointer for GetReleaseInfo
IMSLogon - The MSLOGON object is returned by the Logon () method of the * MSPROVIDER interface.
IMSProvider -
IXPLogon -
IXPProvider -

Functions

Types

PMSGSERVICEENTRY
PNOTIFKEY
POPTIONDATA
TABPROVIDERINIT
TMSGSERVICEENTRY
TMSPROVIDERINIT
TNOTIFKEY
TOPTIONCALLBACK
TOPTIONDATA
TPREPROCESSMESSAGE
TREMOVEPREPROCESSINFO
TXPPROVIDERINIT

Constants

BEGIN_DEFERRED
CALLBACK_DISCONTINUE
CHECK_SENDER
CURRENT_SPI_VERSION
DEINIT_HURRY
DEINIT_NORMAL
DIALOG_ALLOW_CANCEL
DIALOG_ATTACH
DIALOG_CONFIRM_CANCEL
DIALOG_COPY
DIALOG_DELETE
DIALOG_FOLDER
DIALOG_MESSAGE
DIALOG_MOVE
DIALOG_PROP
END_DONT_RESEND
END_RESEND_LATER
END_RESEND_NOW
FILL_ENTRY
LOGOFF_HURRY
LOGOFF_NORMAL
LOGON_CHANGED
LOGON_NO_CONNECT
LOGON_NO_DIALOG
LOGON_NO_INBOUND
LOGON_NO_OUTBOUND
LOGON_SP_IDLE
LOGON_SP_NEWPW
LOGON_SP_POLL
LOGON_SP_PROMPT
LOGON_SP_RESOLVE
LOGON_SP_TRANSPORT
MAPI_NON_READ
MSG_SERVICE_CONFIGURE
MSG_SERVICE_CREATE
MSG_SERVICE_DELETE
MSG_SERVICE_INSTALL
MSG_SERVICE_PROVIDER_CREATE
MSG_SERVICE_PROVIDER_DELETE
MSG_SERVICE_UI_READ_ONLY
MSG_SERVICE_UNINSTALL
NEEDS_PREPROCESSING
NEEDS_SPOOLER
NON_STANDARD
NOTIFY_ABORT_DEFERRED
NOTIFY_BEGIN_INBOUND
NOTIFY_BEGIN_INBOUND_FLUSH
NOTIFY_BEGIN_OUTBOUND
NOTIFY_BEGIN_OUTBOUND_FLUSH
NOTIFY_CANCELED
NOTIFY_CANCEL_MESSAGE
NOTIFY_CONFIG_CHANGE
NOTIFY_CRITICAL_ERROR
NOTIFY_CRITSEC
NOTIFY_END_INBOUND
NOTIFY_END_INBOUND_FLUSH
NOTIFY_END_OUTBOUND
NOTIFY_END_OUTBOUND_FLUSH
NOTIFY_NEWMAIL
NOTIFY_NEWMAIL_RECEIVED
NOTIFY_NONCRIT
NOTIFY_READYTOSEND
NOTIFY_SENTDEFERRED
NOTIFY_SYNC
OPTION_TYPE_MESSAGE
OPTION_TYPE_RECIPIENT
PDK1_SPI_VERSION
PDK2_SPI_VERSION
PDK3_SPI_VERSION
SERVICE_LOGON_FAILED
STATUSROW_UPDATE
STGSTRM_CREATE
STGSTRM_CURRENT
STGSTRM_MODIFY
STGSTRM_RESET

Variables


Functions


Types


PMSGSERVICEENTRY = ^TMSGSERVICEENTRY

PNOTIFKEY = ^TNOTIFKEY
Key contents
POPTIONDATA = ^TOPTIONDATA
Default Options property values
TABPROVIDERINIT = function (hInstance : HINST; lpMalloc : IMalloc;
    lpAllocateBuffer : PALLOCATEBUFFER; lpAllocateMore : PALLOCATEMORE;
    lpFreeBuffer : PFREEBUFFER; ulFlags : ULONG; ulMAPIVer : ULONG;
    var lpulProviderVer : ULONG;
    var lppABProvider : IABProvider) : HResult
!! Note: Address book providers export a function called "ABProviderInit" following the syntax of this function declaration
TMSGSERVICEENTRY = function (hInstance : HINST; lpMalloc : IMalloc;
    lpMAPISup : IMAPISupport; ulUIParam : ULONG; ulFlags : ULONG;
    ulContext : ULONG; cValues : ULONG; lpProps : PSPropValue;
    lpProviderAdmin : IProviderAdmin;
    var lppMapiError : PMAPIERROR) : HResult
Prototype for service configuration entry point } {!! Note: Providers may export a function following the syntax of this function declaration
TMSPROVIDERINIT = function (hInstance : HINST;
    lpMalloc : IMalloc; { AddRef() if you keep it }
    lpAllocateBuffer : PALLOCATEBUFFER; { -> AllocateBuffer }
    lpAllocateMore : PALLOCATEMORE; { -> AllocateMore   }
    lpFreeBuffer : PFREEBUFFER; { -> FreeBuffer     }
    ulFlags : ULONG; ulMAPIVer : ULONG; var lpulProviderVer : ULONG;
    var lppMSProvider : IMSProvider) : HResult
Message Store Provider Entry Point } {!! Note: Message store providers export a function called "MSProviderInit" following the syntax of this function declaration
TNOTIFKEY = record
cb : ULONG;
ab : array[0..MAPI_DIM - 1] of Byte;
end;
* Forward declaration of interface pointers specific to the service * provider interface. *) { IMAPISupport Interface -------------------------------------------------- } { Notification key structure for the MAPI notification engine
TOPTIONCALLBACK = function (hInst : HINST; lpMalloc : IMalloc;
    ulFlags : ULONG; cbOptionData : ULONG; lpbOptionData : PBYTE;
    lpMAPISup : IMAPISupport; lpDataSource : IMAPIProp;
    var lppWrappedSource : IMAPIProp;
    var lppMAPIError : PMAPIERROR) : SCODE

TOPTIONDATA = record
ulFlags : ULONG;
lpRecipGUID : PGUID;
lpszAdrType : PChar;
lpszDLLName : PChar;
ulOrdinal : ULONG;
cbOptionsData : ULONG;
lpbOptionsData : PBYTE;
cOptionsProps : ULONG;
lpOptionsProps : PSPropValue;
end;

TPREPROCESSMESSAGE = function (lpvSession : Pointer; lpMessage : IMessage;
    lpAdrBook : IAddrBook; lpFolder : IMAPIFolder;
    AllocateBuffer : PALLOCATEBUFFER; AllocateMore : PALLOCATEMORE;
    FreeBuffer : PFREEBUFFER; var lpcOutbound : ULONG;
    var lpppMessage : IMessage;
    var lppRecipList : PADRLIST) : HResult
For DoConfigPropSheet() } {***** MAPI_UNICODE ((ULONG) 0x80000000) } { Preprocessor calls: } { PreprocessMessage, first ordinal in RegisterPreprocessor().
TREMOVEPREPROCESSINFO = function (lpMessage : IMessage) : HResult
RemovePreprocessInfo, second ordinal in RegisterPreprocessor().
TXPPROVIDERINIT = function (hInstance : HINST; lpMalloc : IMalloc;
    lpAllocateBuffer : PALLOCATEBUFFER; lpAllocateMore : PALLOCATEMORE;
    lpFreeBuffer : PFREEBUFFER; ulFlags : ULONG; ulMAPIVer : ULONG;
    var lpulProviderVer : ULONG;
    var lppXPProvider : IXPProvider) : HResult
Transport Provider Entry Point

Constants

BEGIN_DEFERRED = ULONG( $00000001)

For SubmitMessage

CALLBACK_DISCONTINUE = ULONG( $80000000)

From the Notification Callback function (well, this is really a ulResult)

CHECK_SENDER = ULONG( $00000001)

PrepareSubmit

CURRENT_SPI_VERSION = $00010010

* M A P I S P I . H * * Defines the calls and structures exchanged between MAPI or the spooler * and the MAPI service providers * * Copyright 1986-1996 Microsoft Corporation. All Rights Reserved. *) (* The MAPI SPI has a version number. MAPIX.DLL knows and supports * one or more versions of the SPI. Each provider supports one or * more versions of the SPI. Checks are performed in both MAPIX.DLL * and in the provider to ensure that they agree to use exactly one * version of the MAPI SPI. * * The SPI version number is composed of a major (8-bit) version, * minor (8-bit) version, and micro (16-bit) version. The first * retail ship of MAPI 1.0 is expected to be version 1.0.0. * The major version number changes rarely. * The minor version number changes opon each retail ship of * MAPI if the SPI has been modified. * The micro version number changes internally at Microsoft * during development of MAPI. * * The version of the SPI documented by this set of header files * is ALWAYS known as "CURRENT_SPI_VERSION". If you write a * service provider, and get a new set of header files, and update * your code to the new interface, you'll be at the "current" version.

DEINIT_HURRY = ULONG( $80000000)

DEINIT_NORMAL = ULONG( $00000001)

****************************************************************} { } { TRANSPORT SPI } { } {******************************************************************} { For DeinitTransport

DIALOG_ALLOW_CANCEL = ULONG( $00000080)

DIALOG_ATTACH = ULONG( $00000008)

DIALOG_CONFIRM_CANCEL = ULONG( $00000100)

DIALOG_COPY = ULONG( $00000020)

DIALOG_DELETE = ULONG( $00000040)

DIALOG_FOLDER = ULONG( $00000001)

DoMCDialog

DIALOG_MESSAGE = ULONG( $00000002)

DIALOG_MOVE = ULONG( $00000010)

DIALOG_PROP = ULONG( $00000004)

END_DONT_RESEND = ULONG( $00040000)

END_RESEND_LATER = ULONG( $00020000)

END_RESEND_NOW = ULONG( $00010000)

For EndMessage } { Flags that the Spooler may pass to the Transport: } { Flags that the transport may pass to the Spooler:

FILL_ENTRY = ULONG( $00000001)

****************************************************************} { } { ADDRESS BOOK SPI } { } {******************************************************************} { Address Book Provider ------------------------------------------------- } { OpenTemplateID()

LOGOFF_HURRY = ULONG( $80000000)

LOGOFF_NORMAL = ULONG( $00000001)

For TransportLogoff

LOGON_CHANGED = ULONG( $00000008)

LOGON_NO_CONNECT = ULONG( $00000004)

LOGON_NO_DIALOG = ULONG( $00000001)

For TransportLogon } { Flags that the Spooler may pass to the transport:

LOGON_NO_INBOUND = ULONG( $00000008)

LOGON_NO_OUTBOUND = ULONG( $00000010)

LOGON_SP_IDLE = ULONG( $00010000)

#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h } { Flags that the transport may pass to the Spooler:

LOGON_SP_NEWPW = ULONG( $00000004)

LOGON_SP_POLL = ULONG( $00020000)

LOGON_SP_PROMPT = ULONG( $00000002)

LOGON_SP_RESOLVE = ULONG( $00040000)

LOGON_SP_TRANSPORT = ULONG( $00000001)

****************************************************************} { } { MESSAGE STORE SPI } { } {******************************************************************} { Flags and enums } { For Logon() } {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h } {#define MDB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h } {#define MDB_WRITE ((ULONG) 0x00000004) in mapidefs.h } {#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) in mapidefs.h } {#define MDB_TEMPORARY ((ULONG) 0x00000020) in mapidefs.h } {#define MDB_NO_MAIL ((ULONG) 0x00000080) in mapidefs.h } { For SpoolerLogon() } {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h } {#define MDB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h } {#define MDB_WRITE ((ULONG) 0x00000004) in mapidefs.h } {#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) in mapidefs.h } { GetCredentials, SetCredentials

MAPI_NON_READ = ULONG( $00000001)

For GetOneOffTable() } {***** MAPI_UNICODE ((ULONG) 0x80000000) } { For CreateOneOff() } {***** MAPI_UNICODE ((ULONG) 0x80000000) } {***** MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000) } { For ReadReceipt()

MSG_SERVICE_CONFIGURE = $00000003

MSG_SERVICE_CREATE = $00000002

MSG_SERVICE_DELETE = $00000004

MSG_SERVICE_INSTALL = $00000001

Contexts for service configuration entry point

MSG_SERVICE_PROVIDER_CREATE = $00000006

MSG_SERVICE_PROVIDER_DELETE = $00000007

MSG_SERVICE_UI_READ_ONLY = $00000008 { display parameters only }

****************************************************************} { } { MESSAGE SERVICE CONFIGURATION } { } {******************************************************************} { Flags for service configuration entry point } { #define MAPI_UNICODE 0x80000000 } { #define SERVICE_UI_ALWAYS 0x00000002 } { #define SERVICE_UI_ALLOWED 0x00000010

MSG_SERVICE_UNINSTALL = $00000005

NEEDS_PREPROCESSING = ULONG( $00000001)

ExpandRecips

NEEDS_SPOOLER = ULONG( $00000002)

NON_STANDARD = ULONG( $00010000)

NOTIFY_ABORT_DEFERRED = ULONG( $40000000)

For XP_AddressTypes } {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h } { For XP_RegisterRecipOptions } {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h } { For XP_RegisterMessageOptions } {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h } { For TransportNotify

NOTIFY_BEGIN_INBOUND = ULONG( $00000001)

NOTIFY_BEGIN_INBOUND_FLUSH = ULONG( $00000004)

NOTIFY_BEGIN_OUTBOUND = ULONG( $00000002)

NOTIFY_BEGIN_OUTBOUND_FLUSH = ULONG( $00000008)

NOTIFY_CANCELED = ULONG( $80000000)

For Notify()

NOTIFY_CANCEL_MESSAGE = ULONG( $80000000)

NOTIFY_CONFIG_CHANGE = ULONG( $00004000)

NOTIFY_CRITICAL_ERROR = ULONG( $10000000)

NOTIFY_CRITSEC = ULONG( $00001000)

NOTIFY_END_INBOUND = ULONG( $00010000)

NOTIFY_END_INBOUND_FLUSH = ULONG( $00040000)

NOTIFY_END_OUTBOUND = ULONG( $00020000)

NOTIFY_END_OUTBOUND_FLUSH = ULONG( $00080000)

NOTIFY_NEWMAIL = ULONG( $00000001)

For Transport's SpoolerNotify()

NOTIFY_NEWMAIL_RECEIVED = ULONG( $20000000)

For Message Store's SpoolerNotify()

NOTIFY_NONCRIT = ULONG( $00002000)

NOTIFY_READYTOSEND = ULONG( $00000002)

NOTIFY_SENTDEFERRED = ULONG( $00000004)

NOTIFY_SYNC = ULONG( $40000000)

For Subscribe()

OPTION_TYPE_MESSAGE = ULONG( $00000002)

OPTION_TYPE_RECIPIENT = ULONG( $00000001)

OptionData returned from call to RegisterOptions

PDK1_SPI_VERSION = $00010000 { 0.1.0 MAPI PDK1 Spring 1993 }

Here are some well-known SPI version numbers: * (These will eventually be useful for provider-writers who * might choose to make provider DLLs that support more than * one version of the MAPI SPI.

PDK2_SPI_VERSION = $00010008 { 0.1.8 MAPI PDK2 Spring 1994 }

0.1.0 MAPI PDK1 Spring 1993

PDK3_SPI_VERSION = $00010010 { 0.1.16 MAPI PDK3 Fall 1994 }

0.1.8 MAPI PDK2 Spring 1994

SERVICE_LOGON_FAILED = $00000020 { reconfigure provider }

display parameters only

STATUSROW_UPDATE = ULONG( $10000000)

For ModifyStatusRow()

STGSTRM_CREATE = ULONG( $00001000)

STGSTRM_CURRENT = ULONG( $10000000)

STGSTRM_MODIFY = ULONG( $00000002)

STGSTRM_RESET = ULONG( $00000000)

For IStorageFromStream()

Variables