Article ID: 244764 - Last Review: March 4, 2004 - Revision: 3.3 Mapi Forms Need IDispatch Interfaces to Be ImplementedThis article was previously published under Q244764 SUMMARY
Microsoft Outlook 2000 requires that all Messaging Application Programming Interface (MAPI) forms support Automation by implementing IDispatch. Forms which worked in previous builds of MAPI may not work reliably in Outlook 2000 unless they implement IDispatch. Adding IDispatch support to a MAPI form may not interfere with its performance on previous builds of Outlook.
MORE INFORMATION
The following Visual Basic code can cause unexpected errors when run against a MAPI form which does not implement IDispatch. A common error is that four instances of the form server are launched.
To simply implement a skeleton of IDispatch and provide access to it through the form's QueryInterface implementation is enough to enable Outlook to behave with the form. Standard Outlook Form commands, such as Display and Close, still do not work unless you expose them through IDispatch::GetIDsOfNames and IDispatch::Invoke. In order to speed the execution of certain common verbs, Outlook expects that some commands always use the same DISPID, such as 0xF0A6 for Display and 0xF023 for Close. These DISPID's can be discovered by watching which DISPID's are passed to Invoke. To see a sample form which implements IDispatch, check out 246524
(http://support.microsoft.com/kb/246524/EN-US/
)
SAMPLE: MAPI Form Which Implements IDispatch
| Article Translations
|
Back to the top
