Skip to Content
CDO & MAPI Programming with Visual Basic:
book

CDO & MAPI Programming with Visual Basic:

by Dave Grundgeiger
October 2000
Intermediate to advanced
384 pages
10h 22m
English
O'Reilly Media, Inc.
Content preview from CDO & MAPI Programming with Visual Basic:

Programmatically Discovering Whether MAPI Is Present

Application programs can examine the Windows registry to determine whether messaging components have been installed on the computer. The registry key used for this purpose is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem

Table 2-4 shows the entry names to look for. A value of "1" for any entry means that the corresponding component is present on the computer.

Table 2-4. Registry Entries for Determining Whether Messaging Components are Installed

Messaging Component

Registry Entry Name

MAPI

"MAPIX"

Simple MAPI

"MAPI"

CMC

"CMC"

CDO

"OLEMessaging"

Your Visual Basic application has merely to check for these registry entries to determine whether specific messaging components have been installed. Unfortunately, the Visual Basic functions for registry access—SaveSetting, GetSetting, GetAllSettings, and DeleteSetting—are not flexible enough to retrieve data from arbitrary registry keys. Because checking for messaging components is potentially a useful feature, I’ll explain how to access arbitrary registry keys from Visual Basic. I’ll also give you a function that nicely wraps up the cumbersome stuff.

To access arbitrary registry entries, it is necessary to use the Win32 registry API functions RegOpenKeyEx, RegQueryValueEx, and RegCloseKey. Win32 API functions are made available to Visual Basic through Visual Basic’s Declare statement. The Declare statement specifies the name of the desired function, as well ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Excel® 2007 VBA Programmer's Reference

Excel® 2007 VBA Programmer's Reference

John Green, Stephen Bullen, Rob Bovey, Michael Alexander
COM Programming with Microsoft® .NET

COM Programming with Microsoft® .NET

John Paul Mueller, Julian Templeman

Publisher Resources

ISBN: 156592665XSupplemental ContentCatalog PageErrata