HOWTO: Adding Help to a Service Provider Property Page

ID: Q167891

The information in this article applies to:

SUMMARY

When MAPI is used to write a service provider, it is sometimes necessary to enable Help for the property pages included with the provider. The property pages are exposed by asking for the properties of a service under the Services tab of a profile. The steps listed below describe the method used to add Help to these property pages.

MORE INFORMATION

The steps outlined below assume that a dialog box already exists for the property page of your service provider and MAPI display tables are being used for these property pages.

1. Modify the Mapisvc.inf file to include a section titled [Help File

   Mappings]. Add an entry for your service provider that points to your
   Help file, for example:

      [Help File Mappings]
      My Service Provider=C:\TEST\myhelp.hlp

2. Since the display table uses an array of DTPAGE structures you must set
   the lpszComponent member of the DTPAGE structure you are interested in.
   So to set the help of the first page to point to your help file you
   would modify the lpszComponent member as follows:

      DtPropPages[0].lpszComponent = "My Service Provider";

   where DtPropPages[0] is an array of DTPAGE types. This text string
   should match the entry in the Mapisvc.inf file that was added.

3. Another member of the DTPAGE structure points to a second structure that
   defines all the controls and properties on the DTPAGE. This member is
   lpctl and points to a variable of type DTCTL.

      DtPropPages[0].lpctl = UserConfigPage;

4. The next step is to point the property page to a specific topic in your
   Help file that you enabled in step 2. One of the controls that can be
   added to the DTCTL structure is the DTBLPAGE. The DTBLPAGE structure
   describes a tabbed page that is a control that is used to separate
   several related dialog boxes. The fourth member of the DTBLPAGE
   structure is the mapped Topic ID you want to link to in your Help file,
   for example:

      DTBLPAGE        DtPage       = { sizeof(DTBLPAGE),  0, 0, 1};

   The fourth member, which is the number 1, is the mapped Topic ID from
   your help file.

5. The last step is to modify your Help file to create a mapped Topic ID.
   You must map your Topic ID to the same number you specified in step 4
   above. In this case, you mapped a Topic ID to the number 1, for example:

   If your help file contains a Topic ID of 'Service_Provider_Help', you
   should map this topic to the number 1. The Microsoft Help Workshop has
   an option to map topics to numerical values. Your mapping would look
   like this:

      Service_Provider_Help=1
Keywords          : kbMsg kbMAPI100 
Version           : 1.0
Platform          : WINDOWS
Issue type        : kbhowto

Last Reviewed: May 15, 1997