Sunteți pe pagina 1din 3

This 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 it's functionality: 1. Create a new blank profile. 2. Add services to a profile. 3. Delete services from a profile. 4. List the services in a profile. 5. Add providers to a service. 6. Delete providers from a service. 7. List the providers in a service. 8. Set the default store provider of a service. 9. List the availible properties of a provider. Source Files ------------ ServiceDlg.cpp: contains the code for the user interface of the dialog that displays the services installed in a particular profile. - ServiceObj.cpp: contains the code that manages the data used by ServiceDlg.CPP. - ProviderDlg.cpp: contains the code for the user interface of the dialog that displays the providers of a particular service. - ProviderObj.cpp: contains the code that manages the data used by ProviderDlg.CPP. - ProvPropsDlg.cpp: contains the code for the user interface of the dialog that displays the properties of a particular provider. - ProvPropsObj.cpp: contains the code that manages the data used by ProvPropsObj.CPP. - SelectService.cpp: contains the code for the user interface and data that will display all availible services installed on the system and allow the user to select one to be installed. - SelectProvider.cpp: contains the code for the user interface and data that will display all availible providers for the selected service and allow the user to select one to be installed. - ProfileNameDlg.cpp: contains the code for the user interface and data that will display a simple dialog to allow user to enter the name of a profile to be created. - StdAfx.cpp: source file that includes just the standard includes. - ProfMan.cpp: defines the class behaviors for the application. Header Files

-----------ServiceDlg.h ServiceObj.h ProviderDlg.h ProviderObj.h ProvPropsDlg.h ProvPropsObj.h SelectService.h SelectProvider.h ProfileNameDlg.h ProfManDlg.h StdAfx.h ProfMan.h Resource.h

Resource Files -------------- ProfMan.ico - ProfMan.rc Project Files ------------- Profman.dsw: Microsoft Developer Studio Workspace - Profman.dsp: Microsoft VC++ Project file SETUP ----To build this sample follow these steps: 1. Extract the files from the self-extracting executable profsamp.exe 2. Open a command prompt in the directory you extracted the files into. 3. To build the sample, type the command, nmake profman.mak This will create a .\Debug directory and place the built executable in it. Running the Sample -----------------There are two main dialog boxes that you will see when you run this sample appli cation: 1. Main Dialog Box (titled Profile Manager): - The "New" Button will allow you to create a new profile. This newly create profile will be blank (no service providers installed). You will be prompted to enter a name for the new profile. - The "Open" Button will allow you to open a different profile. Doing so will close your currently loaded profile. - The "Get Providers" Button will bring up a dialog box titled "Providers". This dialog box will display all of the providers

installed for the currently selected service. For instructions on how to use this dialog, see "2. Provider Dialog Box" below). - The "Add Service" Button will bring up a dialog box titled "Add Service". This dialog box will present you with a list of availible MAPI Service providers on your system. You can select one of them to have it installed. When you select a service to be installed, the service is likely to 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 was selected on the mail dialog. - The "Get Properties" button will display *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 will bring up a dialog box which lists all of the providers of the current service. The user can now select one of the providers to install. - The "Delete Provider" button will simply remove the currently selected provider. - The "SetDefaultStore" button will attempt to set the currently selected provider as the default store for the provider. If this call fails, it is likely that the selected provider can not be made the default store.

S-ar putea să vă placă și