Windows Dev Center

Library Files and Compiler Settings

To develop an application using the Windows Media Format SDK, you must use Microsoft Visual C++ version 6.0 or later. The only programming languages appropriate for development are C++ and C.

The contents of the various header files included with this SDK are described in the following table.

Header file Description
asferr.hDefines error codes relating to ASF file operations. This header is included in wmsdk.h.
drmexternals.hDefines structures, enumerations, and constants used for digital rights management (DRM). Include this header when writing an application that uses DRM.
dshowasf.hDefines the Microsoft DirectShow QASF filters. Include this header when writing a DirectShow application that creates or reads ASF files. For more information, see DirectShow and Windows Media.
msnetobj.hDefines the IRMGetLicense interface, which is implemented in one of the runtime libraries installed with the Windows Media Format SDK.
nserror.hDefines error codes for Windows Media Technologies. Only a subset of these error codes are relevant to the Windows Media Format SDK. This header is included in wmsdk.h.
wmdxva.hIncludes other headers and definitions needed to enable Microsoft DirectX Video Acceleration for playback of Windows Media–based content. For more information, see Enabling DirectX Video Acceleration.
wmnetsourcecreator.hContains information needed to create network source plug-ins.
wmsbuffer.hDefines the interfaces used by buffer objects. Include this header when creating your own buffers for file reading.
wmsdk.hThe main header for applications using the Windows Media Format SDK. This header contains no definitions, but includes asferr.h, nserror.h, windows.h, and wmsdkidl.h. Include this header for all applications using this SDK.
wmsdkidl.hDefines the interfaces, functions, structures, enumerations, and constants for most of the objects of the Windows Media Format SDK. This header is included in wmsdk.h.
wmsinternaladminnetsource.hDefines the interfaces of network source plug-ins.
wmsysprf.hDefines the constants for the system profiles. Include this header in applications that load system profiles by identifier.

 

To use the Windows Media Format SDK, your compiler must be properly configured. The configuration is different for building in debug mode than for release mode. Configure your setting according to the following table. All these setting are configured in the Project Settings dialog box. To get to the dialog box, select Settings from the Project menu.

Setting Debug value Release value
(C/C++ tab, Category = Code Generation) Use run-time library Debug Multithreaded DLL Multithreaded DLL
(Link tab, Category = General) Ignore all default libraries (check box)SelectedSelected
(Link tab, Category = General) Object/library modulesInclude Msvcrtd.lib and Wmvcore.lib.

Do not include Libc.lib or any variation.

Include Msvcrt.lib and Wmvcore.lib.

Do not include Libc.lib or any variation.

 

If you are using Microsoft Visual Studio .NET, the settings have been changed to different locations, as shown in the following table. All of these settings are configured in the Property Pages dialog box. To get to the dialog box, right-click on your project in the Solution Explorer pane and select Properties from the context menu.

Setting Debug Value Release value
(Configuration Properties / C/C++ / Code Generation) Runtime Library Multi-threaded Debug DLL (/MDd) Multi-threaded DLL (/MD)
(Configuration Properties / Linker / Input) Additional DependenciesInclude Msvcrtd.lib and Wmvcore.lib.

Do not include Libc.lib or any variation.

Include Msvcrt.lib and Wmvcore.lib.

Do not include Libc.lib or any variation.

(Configuration Properties / Linker / Input) Ignore All Default Libraries Yes Yes

 

If you want to delay the loading of Wmvcore.dll, or any other DLL, use the link option /DELAYLOAD in Microsoft Visual C++ 6.0, or Delay Loaded DLLs in Microsoft Visual C++ .NET.

Additionally, you need to include the directories for the libraries and headers of the Windows Media Format SDK. To find the directory settings for Visual C++ 6.0, on the Tools menu, click Options, and then click the Directories tab. When using Visual C++ .NET, click Options on the Tools menu, and then select Projects / VC++ Directories in the options list. Add directories as shown in the following table. If you changed the installation directory for the Windows Media Format SDK, your path will be different.

Directory type Default path
Include filesC:\WMSDK\WMFSDK11\include
Library filesC:\WMSDK\WMFSDK11\lib

 

If you are using the Platform SDK then the default paths would appear as follows:

Directory type Default path
Include filesC:\Program Files\Microsoft SDsK\Windows\v6.0\Include
Library filesC:\Program Files\Microsoft SDsK\Windows\v6.0\Lib

 

Before calling any of the creation functions, COM should be initialized with a call to Coinitialize or CoinitializeEx. Either the free threading model or the apartment threading model can be used, but the apartment threading model imposes threading restrictions on the application. For more information on the Microsoft Component Object Model (COM), see the COM page at the Microsoft Web site.

Note Applications that play or create files protected by Digital Rights Management (DRM) require an individualized static library that must be obtained separately from Microsoft. For more information, see the Windows Media Licensing Form at the Microsoft Web site. If you use the DRM library, you should not link to Wmvcore.lib.

Related topics

Getting Started

 

 

Community Additions

ADD
Show:
© 2015 Microsoft