Build Information


In order to use some of the filters and applications supplied as DirectShow samples, you need to build them into excutable or DLL (.ax) files. To build, you need various tools. And once you have built a filter, you need to register it with a unique identifier to make it appear in the Filter Graph Editor. This section discusses the following topics:

Tools for Building the Samples

The tools you need to build the filters and applications supplied as DirectShow samples are included in the following list. This list contains both required and optional tools.

Building the Samples

All samples in the SDK have been provided with a makefile that is compatible with nmake. In some cases, a Visual C++ project makefile is also included.

To build the samples using the standard makefiles, you must first set up your build tools (for example, Microsoft Visual C++), the Win32 headers and libraries, and the DirectShow SDK. The DirectShow SDK makefiles expect to locate the standard Windows® and Win32 include files and libraries on the INCLUDE and LIB paths. The makefiles handle all DirectShow-specific files on a project-by-project basis.

The makefiles provided for each individual sample use ActiveX.mak, which is provided with the DirectShow SDK. If you are using ActiveX.mak to build for any machine, other than the default x86, you must set the CPU environment variable to indicate which kind of machine. The allowable values for the CPU are i386, ALPHA, and PPC.

Performance Note If you copy any sample makefile to create a new dynamic-link library (DLL) (including filters and PIDs) make sure that you change the base address to avoid collisions with other DLLs. A collision of DLL load address results in one of the DLLs having to be relocated during load time, thereby increasing the duration of load time. In the sample makefiles, the base address is set in DLL_BASE, which is used in ActiveX.mak. Do not let ActiveX.mak use the default value for DLL_BASE, as this will almost certainly cause collisions.

A makefile is provided (in the Samples directory) that builds all the samples.

Setting Up the Registry

The source directory for each sample contains a registry file (.reg). Sample filters are registered by default. You can re-register all filters in the sample by opening this file. The samples also use the preferred self-registration capabilities provided by the IAMovieSetup interface. See Register DirectShow Objects for more information.

Caution: If you modify a registry file and then use it to update your registry, you will affect the sample filter that is already installed on your system. For example, if you modify Ball.reg, you may lose access to the ball filter (Ball.ax) in the Filter Graph Editor.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.