IMDSPObject2::WriteOnClearChannel method (mswmdm.h)

The WriteOnClearChannel method writes data to the object to the current position within the object, without using secure authenticated channels. This operation is valid only if the storage object represents a file. If IMDSPObject2 is supported, this method must be implemented. Windows Media Device Manager does not fall back to IMDSPObject::Write if this method fails.


HRESULT WriteOnClearChannel(
  [in]      BYTE  *pData,
  [in, out] DWORD *pdwSize


[in] pData

Pointer to the buffer containing the data to write to the object.

[in, out] pdwSize

Pointer to a DWORD containing the number of bytes of data to write. Upon return, this parameter contains the actual number of bytes written.

Return value

The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:

  • Standard COM error codes
  • Windows error codes converted to HRESULT values
  • Windows Media Device Manager error codes
For an extensive list of possible error codes, see Error Codes.


This method can be used with DRM-protected content. It is more efficient than IMDSPObject::Write because this method does not involve encrypting and decrypting parameters.

Unlike IMDSPObject::Write, this method does not need to decrypt the data before writing to a device, and is therefore more efficient.


Target Platform Windows
Header mswmdm.h
Library Mssachlp.lib

See also

Enabling Synchronization with Windows Media Player

IMDSPObject2 Interface