Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function reads a file containing MIME-encoded content to be FDRM-protected and creates the device-locked version of that content as well as any associated rights or pending rights.
Syntax
HRESULT FileDrmStoreContent ( LPCTSTR pszInputFileName, LPCTSTR pszOutputFileName, PVOID pvReserved, LPTSTR pszMimeType, DWORD* pcchMimeTypeLen ); |
Parameters
- pszInputFileName
-
[in] Fully qualified path to the file that contains the MIME message to be decoded. This file starts with the Content-Type, "Content-type: ...", optionally proceeded by linear white space.
- pszOutputFileName
-
[in] Fully qualified path to the file to hold the object contained within the MIME message.
- pvReserved
-
Unused. This parameter may be NULL.
- pszMimeType
-
[out] A pointer to the buffer to be filled with the type of the embedded object, "image/jpeg". If this pointer is NULL, this call is treated as a request to obtain the size of the buffer needed to hold the MIME type string.
- pcchMimeTypeLen
-
[in/out] A pointer to a DWORD that holds the length, in characters, of the pszMimeTypebuffer. On entry, this value is the size of the passed buffer. On exit, this is set to the length of the MIME type string that includes the NULL terminator.
Return Values:
The function can return any HRESULT and the application should use the SUCCEEDED and FAILED macros to check the results. The following table shows additional HRESULT values that may be returned.
Value | Description |
---|---|
E_FDRM_NOPROVIDER |
No provider found. |
E_INSUFFICIENTBUFFER |
The output file was not created. * pcchMimeTypeLenwas updated with the required buffer size. |
Remarks
A new file is created holding the FDRM-protected content. The original file is deleted.
The input file must contain a complete and valid MIME message and requires the appropriate content-type header for the DRM specification supported by the device.
Requirements
Header | fdrm.h |
Library | aygshell.lib |
Windows Embedded CE | Windows Embedded CE 6.0 and later |
Windows Mobile | Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later |