Microsoft KB Archive/321579

= PRB: License Expiration Occurs Nearly One Hour Beyond the Expiration Setting That You Assigned the Rights Object =

PSS ID Number: 321579

Article Last Modified on 2/11/2004

-

The information in this article applies to:


 * Microsoft Windows Media Right Manager SDK 7.0
 * Microsoft Windows Media Right Manager SDK 7.1

-



This article was previously published under Q321579



SYMPTOMS
If you use the WMRMRights.ExpirationAfterFirstUse object from the Microsoft Windows Media Rights Manager 7.1 SDK to specify that a license expires one hour after its first use, the license does not expire for nearly two hours after the time it of its first use.

Similarly, if you use the WMRMRights.ExpirationOnStore object from the Microsoft Windows Media Rights Manager 7.1 SDK to specify that a license expires one hour after it is stored on a client's computer, the license does not expire for nearly two hours after the time it is stored.



CAUSE
This behavior occurs because internal Windows Media Rights Manager (WMRM) components calculate the difference between the current time and the time the license is first used or stored in hours only, truncating the minutes and seconds variables in the calculation.

For example, if the content is touched at 10:01:00, and you set the expiration time to 1 hour, expiration should occur at 11:01:00. However, even at 12:00:59, the time difference between 12:00:59 and 10:01:00 (which is actually 1 hour 59 minutes and 59 seconds) is still interpreted as 1 hour.



RESOLUTION
When you issue a license that should expire in  hours after it is first used or stored, work around the issue described in the &quot;Symptoms&quot; section of this article by setting the expiration time to  -1 hours. For example, if the license is supposed to expire in 24 hours, assign 23 to the WMRM rights objects, as in the following examples: WMRMRights.ExpirationAfterFirstUse=23

-or-

WMRMRights.ExpirationOnStore=23



STATUS
This issue will be fixed in the next version of the Microsoft Windows Media Rights Manager 7.1 SDK.

Additional query words: drm 7.1 sdk, WMRMRights.ExpirationAfterFirstUse, ExpirationAfterFirstUse, WMRMRights.ExpirationOnStore, ExpirationOnStore

Keywords: kbDSWMM2003Swept kbprb KB321579

Technology:

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.