The information in this article applies to:
SUMMARY
CmdLanch.exe is a self-extracting executable file that contains a custom extension sample written with Microsoft Visual C++ 5.0 for use with Microsoft Outlook 98. The code sample demonstrates how to implement custom command extensions for the Microsoft Outlook Client. MORE INFORMATIONThe following file is available for download from the Microsoft
Download Center. Click the file name below to download the file: CmdLanch.EXERelease Date: Mar-11-1999 For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. Sample File InformationThe CmdLanch.exe file will self extract to produce the following files:
Installing and Configuring the Sample
Instructions for Customizing CmdLaunchExe.dllThe source for this sample was created using VC++ 5.0 Service Pack 3. You can modify the source for this extension to reflect your own menu item and toolbar button bitmaps. (See the MyExchExtCommands::InstallCommands method for more information.)The .exe that launches can be changed by editing the MyExchExtCommands::DoCommand method. Alternatively, you could request the .exe location from the user using the CommonDialog control. You will also want to edit the following methods to reflect your own text requirements: MyExchExtCommands::Help More Exchange Extension InformationThis sample requires Microsoft Windows NT 3.51 or Windows 95, the MAPI 1.0 PDK, Microsoft Visual C++ version 2.0 (or later), and the Win32 Platform SDK.Exchange client extensions are designed using OLE's Component Object Model. The Client calls methods, which are provided in the extension. In some calls to the extension interface, a pointer to a callback interface is used (IExchExtCallback) for the extension to call back into the Exchange client. For more information regarding this interface, please see "Extending the Microsoft Exchange Client" in the MAPI PDK documentation. This sample implements three interface objects: IExchExt, IExchExtCommands, and IExchExtUserEvents. To extend the command set of Exchange, it is necessary to provide implementations for IExchExt and IExchExtCommands. It is optional to provide implementation for IExchExtUserEvents. This sample implements IExchExtUserEvents to enable or disable the custom command, depending on what object the user is selecting in the Exchange main viewer. The menu item is always enabled in the Search Folder dialog box. The custom command is available in both the Main viewer and the Search Folder dialog box. The IExchExtCommands provides an interface for the client to display context help on the custom menu item and to display tooltip text and status window text. Select the custom menu item and press F1 to open an About dialog box. This extension works in two different contexts, main viewer and search dialog. For each context an extension supports, a complete set of interface objects is created. In this sample, the MyExchExt, MyExchExtCommands and MyExchExtUserEvents objects are created once for the main viewer context and once for the search dialog. However, because there is only one implementation for all contexts, there is a context flag data member which indicates from which context Exchange is calling. A context in many cases corresponds to a user interface. For example, the search viewer is one context and the main viewer is another. QueryInterface is called for each interface identifier (IID) for each context. In this example, QueryInterface is called each time for all IIDs in the main viewer context when Exchange first starts. QueryInterface is called again each time for all IIDs in the search viewer context. For each of the contexts, a unique pointer to the MyExchExtCommands and MyExchExtUserEvents objects is returned to Exchange in the QueryInterface call. Then when Exchange is calling DoCommands from the search viewer, it is calling the one using the interface pointer returned to it through QueryInterface in the search viewer context. When Exchange is calling DoCommands from the main viewer, it is calling the one using the interface pointer returned to it through QueryInterface in the main viewer context. Additional query words:
Keywords : kbfile kbsample kbAutomation kbEDK kbMAPI kbMsg kbOutlook kbOutlook98 kbVC kbOffice2000 |
Last Reviewed: December 14, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |