DirectX SDK

Building DirectMusic Projects

[Visual Basic]

This topic pertains only to application development in C++.

[C++]

Unlike other components of DirectX, the DirectMusic API is completely COM-based and does not contain any library functions, such as helper functions to create COM objects. Therefore, there is no Dmusic.lib file to link to during the build.

Most projects must include the Dmusicc.h and Dmusici.h header files, which contain declarations for the core and performance layers, respectively, and Dmerror.h, which contains return values. Dmusicf.h contains file formats and is needed only for applications such as music authoring tools that work directly with files and do not rely solely on the loaders built into DirectMusic.

Dmksctrl.h contains declarations for the IKsControl interface used for property sets. You do not need this file if you have the Ksproxy.h and Ks.h files.

DirectMusic uses the multithreading capabilities of the Windows 32-bit operating system. Multithreading allows DirectMusic to generate, process, and synthesize music in the background while your application is accomplishing other tasks. Develop your project with multithreading in mind. At least be sure to link with the multithreaded libraries.

Also be sure that your application has access to the GUIDs used by DirectMusic. For more information, see Compiling DirectX Samples and Other DirectX Applications.