How to Compile CAPCPP Sample Using Visual C++ 2.x Compiler (137900)



The information in this article applies to:

  • Microsoft Win32 Software Development Kit (SDK) 3.5
  • Microsoft Win32 Software Development Kit (SDK) 3.51
  • Microsoft Win32 Software Development Kit (SDK) 4.0
  • Microsoft Video for Windows Development Kit 1.1
  • Microsoft Visual C++ 2.0
  • Microsoft Visual C++ 2.1
  • Microsoft Visual C++ 2.2

This article was previously published under Q137900

SUMMARY

CAPCPP is a Microsoft Foundation Class (MFC)-based sample included in the Video for Windows Development Kit. The sample was written as a 16-bit Windows-based application. However, with minor modifications, you can compile it as a 32-bit Windows-based application.

MORE INFORMATION

The CAPCPP sample comes with a project file (Capcpp.mak) created by Visual C++ version 1.5x. To convert this project for use by Visual C++ version 2.x compiler, follow these steps:
  1. Use Visual C++ version 2.x to open Capcpp.mak. It will convert this project file.
  2. Remove Msacm.lib and Vfw.lib from files list presented when you click Library on the Object menu.
  3. Replace FAR PASCAL _export with CALLBACK in the Captevw.cpp file.
  4. Remove #include "avicap.h" from the Captevw.h file.
  5. Add #define _AFX_NO_BSTR_SUPPORT to the beginning of the Stdafx.h file; this removes BSTR errors. For more information about this, please see the following article in the Microsoft Knowledge Base:

    129953 PRB: C2371 BSTR Redefinition When VFW.H Included in MFC App

  6. Add Winmm.lib, Vfw32.lib, and Msacm32.lib to the Link tab that comes up when you click Settings on the Project menu. Also, remove Vfw.lib from the Modules list.
After completing these steps, you are ready to compile the sample as a 32-bit application by using Visual C++ version 2.x.

Modification Type:MajorLast Reviewed:6/12/2001
Keywords:KB137900