Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

The Windows Mobile Software Developer's Kit (SDK) ship with a code sample application named DrmFilethat demonstrates how to use the FDRM API, which allow applications to use Digital Rights Management (DRM) protected content. The application displays DRM protected JPEG images.

The code sample demonstrates the standard method for using FDRM content, which involves:

  1. Initially verifying that you will be able to use the content before attempting to open it. The routine CimageView::OpenImageFiledemonstrates this step using FileDrmVerifyRights.

  2. Using the FDRM method of opening the file. The routine CimageView::OpenImageFiledemonstrates this step using FileDrmCreateFile. This method is used instead of the Win32 CreateFilefunction.

  3. Specify the right used for the content. The routine CimageView::Drawdemonstrates this step using FileDrmCommitRights. For this application, rights to this content are based on the number of times that the content can be used. For this reason, this API is not invoked until after the content opens successfully.

The code sample demonstrates the use of the FileDrmGetMetricfunction to determine how frequently rights to the protected image need to be re-verified. In addition, it shows how to use the FileDrmIsDRMand FileDrmShowLicenseInfofunctions to show the protection status for the JPEG image.

Software Requirements

You must have an FDRM engine installed on your Windows Mobile device.

For your development environment, you must use Visual Studio 2005 or 2008.

Sample Location

To run the code sample, you must install the Windows Mobile 6.5.3 DTK. The solution files are copied to the following folder:

Windows Mobile 6.5.3 DTK\Samples\CPP\Win32\Filedrm\FileDRM.sln

Note:
This sample application is not intended for production use.

See Also

Concepts

FDRM Application Development

Other Resources