Getting the Microsoft Windows Media Format 9.5 SDK Working

Getting the Microsoft Windows Media Format 9.5 SDK Working


Introduction:

This brief tutorial will detail how to get and install the official Microsoft SDK for MTP programming. The SDK is a little old, so minor tweaks are necessary to make it work in modern development environments.

Instructions:

1) Download the Windows Media Format 9.5 SDK, which includes the Windows Media Device Manager 10 SDK. The SDK should be available at http://msdn.microsoft.com/windowsmedia/downloads/default.aspx (wmformat95sdk.exe).

2) Install the SDK.

3) Add the new lib and include directories (by default, c:\wmsdk\wmfsdk95\include, c:\wmsdk\wmfsdk95\wmdm\inc, c:\wmsdk\wmfsdk95\lib, and c:\wmsdk\wmfsdk95\wmdm\lib) into your IDE. For VS2005, this is done by selecting the panel at Tools..Options..Projects&Solutions..VC++ Directories. Other Microsoft development environments are similar.

4) The nmake command which is going to be used to compile the sample applicaton doesn't seem to see the new directories entered into the IDE above, so copy the include files from c:\wmsdk\wmfsdk95\include to c:\wmsdk\wmfsdk95\wmdm\inc (adjust if you put the SDK elsewhere).

5) The nmake command also has trouble with the WMVCORE.lib file -- copy it from c:\wmsdk\wmfsdk95\lib to your Visual Studio environment's main 32-bit library directory (varies by VS installation, but you can find it in the IDE).

6) Edit the file c:\wmsdk\wmfsdk95\wmdm\apps\wmdmapp\properties.cpp, line 688. Add an "int" to the line "for (i..." such that the line starts "for (int i..." instead.

7) Launch Visual Studio, and select Tools...Visual Studio 200X Command Prompt.

8) Navigate to c:\wmsdk\wmfsdk95\wmdm\ and type "nmake".

9) The application should now be built and in the directory c:\wmsdk\wmfsdk95\wmdm\apps\wmdmapp\WIN2000_DEBUG.