Custom DRM Attribute to a WM file via IWMDrmWriter
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
Custom DRM Attribute to a WM file via IWMDrmWriter

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> DRM
Author Message
Nick Haddad
Guest





Posted: Thu Jun 24, 2004 8:18 pm    Post subject: Custom DRM Attribute to a WM file via IWMDrmWriter Reply with quote

Using the WMFSDK, I am attempting to add a custom DRM property to a WM
file as I am DRMing it. After writing calling
IWMDRMWriter::SetDRMAttribute on all the required properties and
attributes I do the following:

hr = pDrmWriter->SetDRMAttribute( wStreamID,
pwszName,
WMT_TYPE_STRING,
reinterpret_cast<const BYTE*>(pwszMyCustomAttrib),
wszBytes( pwszMyCustomAttrib ) ) );


The value of pwszMyCustomAttrib is L"DRMHeader.MyTest".

The call to SetDRMAttribute is successful return S_OK;

However, when reading this DRM'd file into my client app (which also
uses the WMFSDK, or when reading it using the DRMShow sample
application, IWMDRMReader::GetDRMProperty returns
NS_E_DRM_UNSUPPORTED_PROPERTY (0xC00D275D).

Is there something I am doing wrong here in either the reading or the
writing of this property?

The MSDN docs state (in the article Protecting Files with DRM Version 7) :
"You can add any additional property you wish, such as
'DRMHeader.RequireSAP' for example, as a way of communicating additional
information"

Is there an extra step I need here to define my custom property?

Is it possible that these custom properties are only available after
license aquisition?

Thanks in advance for any help you can provide.

-Nick Haddad

Back to top
HongJia[MSFT]
Guest





Posted: Sat Jun 26, 2004 1:38 am    Post subject: Re: Custom DRM Attribute to a WM file via IWMDrmWriter Reply with quote

The prefix string "DRMHeader." is not needed when you write the customized
DRM property. And it is required when Reader read the property. In your
case, just write the "MyTest" when you write the property and read the
property using "DRMHeader.MyTest".

In WMFSDK, IWMDRMWriter->SetDRMAttribute automatically adds the "DRMHeader."
to your costomized DRM Property, while IWMDRMReader_GetDRMProperty doesn't.
In your code, it actually adds the DRM Property as
DRMHeader.DRMHeader.MyTest. The property name is not matched when you try to
read it.
Back to top
Nick Haddad
Guest





Posted: Mon Jun 28, 2004 7:23 pm    Post subject: Re: Custom DRM Attribute to a WM file via IWMDrmWriter Reply with quote

HongJia,

Thanks so much for your time, your answer was very helpful!

I have one more questions.

Are any custom attributes I define included in the DRMHeader's digital
signature? I've noticed that you can modify the ContentID (an Optional
attribute) using a hex editor and still play the file fine in WMP.

Thanks for youre help?

-Nick

Back to top
HongJia[MSFT]
Guest





Posted: Tue Jun 29, 2004 1:07 am    Post subject: Re: Custom DRM Attribute to a WM file via IWMDrmWriter Reply with quote

No problem, you are welcome!

All the DRMHeader attributes including cusotmized attributes are included in
the DRMHeader's digital signature if your DRM content is protected by WMRM
7. Your license server should check the client's header signature in this
case.

Thanks
-HongJia
Back to top
asdfbmw



Joined: 23 Jun 2006
Posts: 3

Posted: Fri Jun 23, 2006 9:08 am    Post subject: Re: Custom DRM Attribute to a WM file via IWMDrmWriter Reply with quote

HongJia[MSFT] wrote:
No problem, you are welcome!

All the DRMHeader attributes including cusotmized attributes are included in
the DRMHeader's digital signature if your DRM content is protected by WMRM
7. Your license server should check the client's header signature in this
case.

Thanks
-HongJia

but can i protect a file just with WMF SDK?
Back to top
View user's profile Send private message
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> DRM All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB