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

ID: Q137900


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK), versions 3.5, 3.51, 4.0
  • Microsoft Video for Windows Development Kit, version 1.1
  • Microsoft Visual C++ 32-bit Edition, versions 2.0, 2.1, 2.2


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:

    Q129953 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.

Additional query words: 1.10 2.00 3.50 2.1 2.20 AVICap MCIWnd video capture visualc

Keywords :
Version :
Platform :
Issue type :


Last Reviewed: January 31, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.