IpcfIsFileEncrypted function

Determines whether a file on disk is encrypted.

Syntax


HRESULT WINAPI IpcfIsFileEncrypted(
  _In_  LPCWSTR wszInputFilePath,
  _Out_ LPDWORD pdwFileStatus
);

Parameters

wszInputFilePath [in]

Type: LPCWSTR

The path to the file to query. 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.

pdwFileStatus [out]

Type: LPDWORD

A pointer to a variable that receives a DWORD that indicates whether and how the file is protected. When the function returns, this parameter can be one of the following values.

IPCF_FILE_STATUS_DECRYPTED (0)

The file is not encrypted.

IPCF_FILE_STATUS_ENCRYPTED_CUSTOM (1)

The file is encrypted using native protection; that is, using an AD RMS file format that is based on its MIME type. Some RMS functionality may not be available.

IPCF_FILE_STATUS_ENCRYPTED (2)

The file is encrypted.

Return value

Type: HRESULT

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
Supported File Formats
File API configuration
Setting the API security
AD RMS developer notes
Error codes

 

 

Show: