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

Last reviewed: October 10, 1997
Article ID: Q137900
4.00    | 3.50 3.51 2.00 2.10 2.20
WINDOWS | WINDOWS NT kbmm kbhowto

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:

    ARTICLE-ID: Q129953

       TITLE     : 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 reference words: 1.10 2.00 3.50 2.1 2.20 AVICap MCIWnd video
capture visualc
KBCategory: kbmm kbhowto
KBSubcategory: MMVideo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.