共用方式為


IWMRMHeaderSigning::AddDigitalSignatureObject

banner art

Previous Next

IWMRMHeaderSigning::AddDigitalSignatureObject

The AddDigitalSignatureObject method signs the ASF content header of protected content in memory.

Syntax

  HRESULT AddDigitalSignatureObject(
  BYTE *pbHeader,
  DWORD dwSize,
  DWORD *pdwBytesNeeded
);

Parameters

pbHeader

[in, out] Pointer to a buffer containing a valid content header. The content header with an ASF Digital Signature object is returned.

dwSize

[in] Size of the pbHeader buffer, in bytes.

pdwBytesNeeded

[out] If dwSize is too small, a value is returned indicating how many more bytes are needed.

Return Values

If the method succeeds, it returns S_OK and the signed content header. If it fails, it returns an HRESULT error code. If dwSize is not large enough, the error NS_E_DRM_BUFFER_TOO_SMALL is returned, and pdwBytesNeeded indicates how many more bytes are needed.

Remarks

The content header must be valid; that is, the header must have an ASF Data object. The Data object can be empty.

If the content already contains a Digital Signature object, this method will replace it with a new one.

This method is similar to the command-line tool Digsig.exe; Digsig.exe digitally signs a file on disk, and this method digitally signs content in memory.

Requirements

Version: Windows Media Rights Manager 9 Series SDK or later

Reference: wmrmobjs 1.0 Type Library

Library: wmrmobjs.dll

Platform: Windows Server 2003

See Also

Previous Next

© 2007 Microsoft Corporation. All rights reserved.