Windows Media Format SDK banner art
PreviousNext

Constants

The following attribute names and global pointers have been defined for use in this SDK.

Attribute name Global pointer Description
Title g_wszWMTitle The attribute value is a string containing the content title.
Author g_wszWMAuthor The attribute value is a string containing the name of the content author.
Description g_wszWMDescription The attribute value is a string containing a description of the content.
Rating g_wszWMRating The attribute value is a string containing a content rating.
Copyright g_wszWMCopyright The attribute value is a string containing a content copyright message.
Duration g_wszWMDuration The attribute value is a double word value containing the playing duration of the file, in 100-nanosecond units.
Bitrate g_wszWMBitrate The attribute value is a double word value containing the bit rate.
Seekable g_wszWMSeekable The attribute value contains a Boolean value denoting that the content is seekable.
Broadcast g_wszWMBroadcast The attribute value contains a Boolean value denoting that the content is not copyright-protected, and can be broadcast.
Use_DRM g_wszWMUse_DRM The attribute value contains a Boolean value. When set to True, it means this content must be encrypted so that it can only be played back on the local computer. When set to False (the default), it means the content must not be encrypted.
DRM_Flags g_wszWMDRM_Flags The attribute value contains a double word value. When this value is set to WMT_RIGHT_PLAYBACK (1), the content can only be played back on the local computer. The content can be copied to a portable playback device by bitwise OR'ing DRM_Flags with WMT_RIGHT_COPY_TO_PORTABLE (2). Decompressed data can be copied to a compact disc by bitwise OR'ing DRM_Flags with WMT_RIGHT_COPY_TO_CD (8). The default value of this attribute is for all three right flags to be set.
DRM_Level g_wszWMDRM_Level The attribute value contains a double word indicating the security level that the calling application must have to use this content. The default value is 150. If you set the value higher than 1000, Microsoft® Windows Media™ Player cannot play the content. If it is set at 500, clear text devices (those in which the content is decrypted by an application using this SDK, and sent to the device without any encryption) cannot play the content.
Is_Protected g_wszWMProtected The attribute value contains a Boolean value indicating that the content was encrypted using DRM.
Is_Trusted g_wszWMTrusted The attribute value contains a Boolean value indicating that the header for the content was digitally signed, and that the signature is trusted by this computer.
Signature_Name g_wszWMSignature_Name The attribute value contains a string. If Is_Trusted is set to True, this attribute returns the name from the certificate with which the content was signed.
WM/AlbumTitle g_wszWMAlbumTitle The attribute value contains a string with the album title.
WM/Track g_wszWMTrack The attribute value contains the track number.
WM/PromotionURL g_wszWMPromotionURL The attribute value contains a string with a URL to an HTML page that contains information about products and events (such as concerts) that are related to this music.
WM/AlbumCoverURL g_wszWMAlbumCoverURL The attribute value contains a string with a URL to an HTML page that contains an image of the album cover and information about the album.
WM/Genre g_wszWMGenre The attribute value contains a string with the genre of the music.
WM/Year g_wszWMYear The attribute value contains a string with the year of publication of the music.

Remarks

To use the attribute names, a developer can code, for example, either SetAttribute(L"Title",...) or SetAttribute(g_wszWMTitle,...). Both methods are identical, but the advantage of the second method is that it returns a compile time error if there is a spelling mistake in the global pointer. The L prefix in the attribute name specifies that the name in quotation marks is a wide-character string.

The attributes Duration, Bitrate, Seekable, Broadcast, Is_Protected, Is_Trusted and Signature_Name cannot be set by the SetAttribute method. If this is attempted, the error code E_FAIL is returned. These values are known or calculated by the system software, and are not stored in the header in the same way as other attributes. These values can be retrieved by GetAttributeByName or GetAttributeByIndex.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.