FILE: Profsamp.exe: How to Manipulate MAPI Profiles Sample

ID: Q176337

The information in this article applies to:

SUMMARY

This sample demonstrates how to accomplish some of the most common profile -related operations.

The sample was written with Microsoft Visual C++ and Microsoft Foundation Classes (MFC).

The following file is available for download from the Microsoft Software Library:

 ~ Profsamp.exe (size: 112897 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

MORE INFORMATION

The sample, Profman, was created to demonstrate how to use the MAPI interfaces and methods that pertain to the manipulation and creation of MAPI profile. Here is a list of the functionality:

Source Files

Header Files

Resource Files

Project Files

SETUP

Follow these steps to build the sample:

1. Extract the files from the self-extracting executable file,

   Profsamp.exe.

2. Open a command prompt in the folder where you extracted the files.

3. To create the sample type the following command:

       nmake profman.mak

   This creates a .\Debug directory and places the built executable
   into the directory.

Running the Sample

There are two main dialog boxes that you see when you run this sample application:

1. Main Dialog Box (titled Profile Manager):

    - The New button allows you to create a new profile. This newly
      created profile will be blank (no service providers installed). You
      will be prompted to enter a name for the new profile.

    - The Open button allows you to open a different profile. This
      closes your currently loaded profile.

    - The Get Providers button brings up a dialog box titled
      Providers. This dialog box displays all of the providers
      installed for the currently selected service. For instructions on how
      to use this dialog, see step 2 below.

    - The Add Service button brings up a dialog box titled Add Service.
      This dialog box presents you with a list of available MAPI Service
      providers on your system. You can select one of them to install. When
      you select a service to be installed, the service may prompt you for
      more information.

    - The Delete Service button will delete the currently selected
      service from your profile.

2. Provider Dialog Box (titled Providers):

   This dialog box lists all of the providers of the service that were
   selected on the mail dialog box:

    - The Get Properties button displays some of the properties of
      the selected provider. Many of the providers properties are not
      exposed to MAPI clients so ProfMan is unable to display them.

    - The Add Provider button brings up a dialog box that lists all
      of the providers of the current service. The user can now select one
      of the providers to install.

    - The Delete Provider button removes the currently selected provider.

    - The SetDefaultStore button attempts to set the currently
      selected provider as the default store for the provider. If this call
      fails, the selected provider can not be made the default store.

Additional query words: MAPI Profile Service Provider
Keywords          : kbMsg kbMAPI100 
Version           : WINDOWS:1.0
Platform          : WINDOWS
Issue type        : kbinfo

Last Reviewed: November 21, 1997