Windows Media Format SDK banner art
PreviousNext

To Create a DRM-Enabled reader

  1. Link in the WMStubdrm.lib file in your project.

  2. Call the WMCreateReader interface to create the DRM reader.

  3. The first argument to the reader is an interface that contains the user’s certificate. 

    Note   This argument must be set to NULL, as the WMStubDRM.lib contains the certificate.

  4. The second argument to the reader must be a valid WMT_RIGHTS enumeration type value.

  5. Instruct the reader to open the file by calling the Open method.

The following example shows how you can create a DRM-enabled reader.

IWMReader*    pReader = NULL;
WMCreateReader(NULL, WMT_RIGHT_PLAYBACK, &pReader);
pReader->Open(pwszURL, &pMyCallback);
PreviousNext


© 1999 Microsoft Corporation. All rights reserved.