Dela via


IpcfGetSerializedLicenseFromFileStream function

Gets the license associated with a file stream.

Syntax

HRESULT WINAPI IpcfGetSerializedLicenseFromFileStream(
  _In_  ILockBytes  *pInputFileStream,
  _In_  LPCWSTR     wszInputFilePath,
  _Out_ PIPC_BUFFER *ppvLicense
);

Parameters

pInputFileStream [in]

Pointer to the byte stream from which to get the serialized license.

wszInputFilePath [in]

The path to the file from which to get the serialized license. The path must include the file name and, if one exists, the file name extension.

This parameter is only used determine the file format, based on the file name extension of the file in the input file stream.

The path is limited to MAX_PATH characters. To extend this limit to 32,767 characters, prepend "\\?\" to the path. For more information, see Naming Files, Paths, and Namespaces.

ppvLicense [out]

A pointer to a variable that receives a pointer to a buffer that holds the license. The buffer is allocated by the File API and must be freed using IpcFreeMemory.

Return value

If the function succeeds, the return value is S_OK. If the function fails, it returns an HRESULT value that indicates the error.

For more information, see Error codes for a description of all RMS SDK 2.1 return values.

Remarks

For supporting information on using the File API part of RMS SDK 2.1 see, Supported File Formats, File API configuration and Setting the API security mode in the AD RMS developer notes topic.

Requirements

Minimum supported client
Windows Vista with SP2
Minimum supported server
Windows Server 2008
Header
Ipcfile.h (include Msipc.h)
Library
Msipc.lib
DLL
Msipc.dll

See also

Naming Files, Paths, and Namespaces

IpcFreeMemory

Supported File Formats

File API configuration

Setting the API security

AD RMS developer notes

Error codes