IpcfGetSerializedLicenseFromFile function

Gets the license associated with a file.

Syntax

HRESULT WINAPI IpcfGetSerializedLicenseFromFile(
  _In_  LPCWSTR     wszInputFilePath,
  _Out_ PIPC_BUFFER *ppvLicense
);

Parameters

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.

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.

Possible values include, but are not limited to, those in the following list.

IPCERROR_FILE_IS_NOT_ENCRYPTED

IPCERROR_FILE_PROTECTOR_BAD_INSTALL

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