Installing a Form into a Library
The default MAPI form manager supplied with the Platform SDK does not provide a user interface for installing forms in the various form libraries. Because of this, you will have to create a small application — or detailed set of instructions — that users can use to install the form.
If you implement an install application, the series of actions it must do to install a form into a folder's associated contents table are as follows:
-
Call the MAPIOpenFormMgr function to open the form manager.
-
Use IMAPIFormMgr::OpenFormContainer or IMAPIFormMgr::SelectFormContainer to select and open the target container for the form.
-
Use the IMAPIFormContainer::InstallForm function to install the form.
Steps 4-6 are for installation into a local form library:
-
Copy all files to the appropriate place on the local disk, if installation is to the local form library on the user's workstation. If necessary, modify the form configuration file to reflect current pathnames of components. The form configuration file can contain relative pathnames in which case this step may not be necessary.
-
Do the appropriate OLE registration to associate the message type with the form server being installed.
-
If the form was installed into the local form library, copy the form's icon (.ICO) and configuration (.CFG) files into the %WINDOWS%\FORMS\CONFIGS directory for auto-restore in the event that the form library is corrupted or deleted. This step is recommended but not mandatory.
Note Installation to a local form library can be simplified by replacing steps 1 and 2 with a call to MAPIOpenLocalFormContainer.