Home | Development | Partners | Resellers | About |
The Messaging API is a COM-like API that provides access to the contents of messaging stores. "Extended MAPI in Delphi" is a package providing access to Outlook-compatible objects through a COM-based API. Using MAPI, a program can connect to a MAPI store, and then perform operations against that store. |
Example # 1 Log in Microsoft Exchange Server and Query User Identity The Extended MAPI is one of the first COM technologies provided by Microsoft. To use any of the extended MAPI functions and/or interfaces (with very few exceptions), before we do anything, we should initialize the Extended MAPI subsystem. For this purpose Microsoft provides the MapiInitialize function. Through this function MAPI initializes the COM system by calling CoInitialize internally. In this example: How to
How to use the HrOpenSessionObject function for retrieving a MAPI IMAPIProp interface for the current session object (user) and get all existing user properties. Example01EM as Compiled Application DELPHI 6 preview Project(DELPHI 6) ZIP file Source Code: In package |
Example # 2 Retrieve Microsoft Exchange GAL (Global Address List) This example will show you how to get access to GAL (Global Address List) The GAL is a single address list that contains all addresses defined at a Microsoft Exchange Server. GAL was presented for the first time in Microsoft Mail postoffice - one of Microsoft's first attempts to provide to users an option allowing them to exchange messages and files not by simply using shared directories and files. For Mail users, the GAL's main purpose is to provide a single list where users can find all the addresses they can send mail to. Users do not need to know the location of the user to whom they want to send mail. Global Address List is a MAPI address book container that holds recipient entries for an entire organization and is available to all e-mail users in that organization. We will learn how to use the following interfaces: IAddrBook - The IAddrBook interface supports access to the MAPI address book and includes operations such as displaying common dialog boxes, opening containers, messaging users, and distribution lists, and performing name resolution. IABContainer - The IABContainer interface provides access to address book containers. MAPI and client applications call the methods of IABContainer to perform name resolution and to create, copy, and delete recipients. IMAPITable - The IMAPITable interface is used to provide a read-only view of a table. IMAPITable is used by clients and service providers to manipulate the way a table appears. We will study in more details the following memory management functions - MAPIAllocateBuffer, MAPIAllocateMore, MAPIFreeBuffer, FreePRows. These functions are used actively in all applications using MAPI. We will study the way MAPI Hierarchy Table and MAPI Content Table are used. We will focus our attention on the ENTRYID structure and how to work with binary MAPI objects, as well as how to work with MAPI Rows and Columns. We will not forget the restrictions we can apply. Include some steps from Example #1 and How to
Example02EM as Compiled Application Source Code: In package |
Example # 3 Retrieve Microsoft Exchange "Light" Hierarchy (by Global Address List) In the previous example we illustrated how to connect to Microsoft Exchange Server, how to obtain the GAL content and to display basic properties of the e-mail user such as PR_DISPLAY_NAME and PR_EMAIL_ADDRESS. In the current example we will review the Hierarchy tables. Through them we may build a tree that displays Exchange Organization (5.5). A hierarchy table contains information about the containers in an address book container. Each row of a hierarchy table contains a set of columns with information about address book container. Hierarchy tables are implemented by address book providers to show a tree of containers within the address book. Containers that cannot hold subcontainers, as indicated by the absence of the AB_SUBCONTAINERS flag in their PR_CONTAINER_FLAGS property, do not implement a hierarchy table. We will also learn how we can turn the PSBinary data in a more user-friendly data type, such as String (for visualization). We will not take time to explain the usage of functions and data that were discussed in the previous examples. This example requires connection to Microsoft Exchange Server for efficient implementation. How to
Example03EM as Compiled Application Source Code: In package |
continue... |
Copyright © 2021 IMIBO
Privacy Statement |