1 out of 1 rated this helpful - Rate this topic

FileEncryptionStatus function

Applies to: desktop apps only

Retrieves the encryption status of the specified file.

Syntax

BOOL WINAPI FileEncryptionStatus(
  __in   LPCTSTR lpFileName,
  __out  LPDWORD lpStatus
);

Parameters

lpFileName [in]

The name of the file.

lpStatus [out]

A pointer to a variable that receives the encryption status of the file. This parameter can be one of the following values.

ValueMeaning
FILE_ENCRYPTABLE
0

The file can be encrypted.

FILE_IS_ENCRYPTED
1

The file is encrypted.

FILE_READ_ONLY
8

The file is a read-only file.

FILE_ROOT_DIR
3

The file is a root directory. Root directories cannot be encrypted.

FILE_SYSTEM_ATTR
2

The file is a system file. System files cannot be encrypted.

FILE_SYSTEM_DIR
4

The file is a system directory. System directories cannot be encrypted.

FILE_SYSTEM_NOT_SUPPORT
6

The file system does not support file encryption.

FILE_UNKNOWN
5

The encryption status is unknown. The file may be encrypted.

FILE_USER_DISALLOWED
7

Reserved for future use.

 

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

WinBase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

Unicode and ANSI names

FileEncryptionStatusW (Unicode) and FileEncryptionStatusA (ANSI)

See also

EncryptFile
File Encryption
File Management Functions

 

 

Send comments about this topic to Microsoft

Build date: 4/17/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ