Set Up an MFC Application Project in Visual Studio

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

To create an MFC Application project and set up the initial configuration

  1. Start Visual Studio.

  2. On the File menu, point to New, and then click Project.

  3. In the New Project dialog box, select the Visual C++ in the Project types pane, select MFC Application in the Templates pane, enter the project (or application) name and location, and then click OK.

  4. In the left pane, click Application Type, select Single document or Multiple documents, and then click Finish if the default settings are appropriate or after custom settings are set.

  5. Perform an initial build of the newly set up project.

    This step ensures that the executable folders are created and ready for use in the following steps.

  6. Copy UccApi.dll, RTCPLTFM.dll, and UccAPIRes.dll to the project’s Debug or Bin directory where the application executable is created (in step 5).

    By default, UccApi.dll and RTCPLTFM.dll are in the C:\Program Files\UCCAPI directory and UCCAPIRes.dll is in the C:\Program Files\UCCAPI\MUI\0409 directory.

  7. Copy UccApi.h, uccApi_i.c, and UccApiDispid.h to the project’s main directory.

    By default, these files are in the C:\Program Files\UccApi directory.

  8. Make sure that the application manifest contains the entries shown in Sample Application Manifest for Side-by-Side Execution and is placed in the directory of the application’s executable.

  9. On the Project menu, click Properties.

  10. In the <project name> Property Pages dialog box, under Linker->Manifest File, set No in the Generate Manifest row, and then fill in the Manifest File row with the path to the application manifest.

    By default, this path is $(IntDir)\<youApplicationName>.exe.manifest.

  11. Under Manifest Tool->Input and Output, fill in the Additional Manifest Files row with the path to the application manifest (as in step 10), and then set the Embed Manifest row to No.

  12. In the Stdafx.h file, add the following #include statements.

    This inclusion ensures that the Unified Communications Client API types and event identifiers can be properly referenced from the entire project.

    #include "uccapi.h"
    #include "uccapidispid.h"
    
  13. You might also want to add the following statement to the Stdafx.c file or in a source file where the class identifiers and/or interface identifiers are referenced.

    #include uccapi_i.c
    

See Also

Concepts

Sample Application Manifest for Side-by-Side Execution
Using Unified Communications Client API in Win32/C++ Client