Previous | Next |
The sample code supplied with the SDK is in the form of projects for Microsoft® Visual C++® version 6.0.
The following samples are installed by default in C:\Wmsdk\Wmfsdk\Samples\. The samples will not work unless the Windows Media Format SDK has been installed. If you have not already installed it, click the following link:
Install Windows Media Format SDK
Sample | Description |
AVIToWMV | Converts files from the Audio-Video Interleaved (AVI) format to Windows Media Format. |
GenProfile | Shows how to generate a profile without using the system profiles. The sample includes a library that takes a few arguments and creates a profile, and an executable file that shows a few examples of how to use the library. |
WMAplay | Plays back Windows Media audio files. Note that this sample will fail if banner images are included as attributes of the audio files. |
WMVCopy | Reads in and writes out a .wmv file, simply to show the necessary code. |
The following Windows Media Device Manager samples are also installed by default in C:\Wmsdk\Wmfsdk\Samples\.To run them, you must obtain a certificate. For more information about certificates, see Acquiring Certificates and Libraries.
Sample | Description |
Mshdsp | Shows how to create a Windows Media Device Manager Service Provider. |
ProgHelp | Implements a Windows Media Device Manager application progress interface. This COM object must be registered before the WmdmApp sample will run. |
WmdmApp | Demonstrates how to write an application that uses Windows Media Device Manager. This application can be used to transfer content to an SDMI-compliant portable medium or device. |
To build the application sample, copy the Key.c file that you obtained from Microsoft into your SDKInstallationDirectory\include directory. This is the certificate required to communicate with Windows Media Device Manager.
The ProgHelp sample must be built before WmdmApp, because the WmdmApp sample requires the Wmdmprogresshelper.h header file. The WmdmApp and ProgHelp projects are contained in the same workspace, WmdmApp.dsw, which specifies this dependency.
To build the Mshdsp Service Provider sample, use the Mshdsp.dsp file in Microsoft® Visual C++® version 6.0, and run Regsvr32.exe to register the resulting Mshdsp.dll file. Then build the sample application from the WmdmApp directory to see how the Service Provider is loaded by the application.
Mshdsp.dll is a sample that enumerates fixed drives as a simulation of enumerating portable media. It demonstrates the relationships between the interfaces and objects involved. Each hard disk volume is enumerated as a device, and folders and files are enumerated as storage objects on their respective devices. You can copy non-SDMI-compliant content to any device that this Service Provider enumerates. To copy SDMI-compliant content to a device, the device must be able to report a hardware-embedded serial number, which hard disks cannot do.
See Also
Previous | Next |