Build Information

To use some of the filters and applications supplied as Microsoft® DirectShow® samples, you need to build them into executable or dynamic-link library (DLL) files. Build a DLL when you want to build a filter (.ax). To build, you need various tools. And after you build a filter, you need to register it with a unique identifier to make it appear in the Filter Graph Editor.

This article contains the following sections.

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, Visual C++), the Win32 headers and libraries, and the DirectX Media SDK. The DirectX Media SDK makefiles expect to locate the standard Microsoft® 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 DirectX Media 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 valid values for the CPU are i386 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 that builds all the samples is provided in the Samples directory.

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 might lose access to the Ball filter (Ball.ax) in the Filter Graph Editor.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.