Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
FileEncryptionStatusA function (winbase.h)
Retrieves the encryption status of the specified file.
Syntax
BOOL FileEncryptionStatusA(
[in] LPCSTR lpFileName,
[out] LPDWORD lpStatus
);
Parameters
[in] lpFileName
The name of the file.
[out] lpStatus
A pointer to a variable that receives the encryption status of the file. This parameter can be one of the following values.
| Value | Meaning |
|---|---|
|
The file can be encrypted.
Home, Home Premium, Starter, and ARM Editions of Windows: FILE_ENCRYPTABLE may be returned but EFS does not support encrypting files on these editions of Windows. |
|
The file is encrypted. |
|
The file is a read-only file. |
|
The file is a root directory. Root directories cannot be encrypted. |
|
The file is a system file. System files cannot be encrypted. |
|
The file is a system directory. System directories cannot be encrypted. |
|
The file system does not support file encryption. |
|
The encryption status is unknown. The file may be encrypted. |
|
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.
Remarks
In Windows 8 and Windows Server 2012, this function is supported by the following technologies.
| Technology | Supported |
|---|---|
| Server Message Block (SMB) 3.0 protocol | Yes |
| SMB 3.0 Transparent Failover (TFO) | No |
| SMB 3.0 with Scale-out File Shares (SO) | No |
| Cluster Shared Volume File System (CsvFS) | No |
| Resilient File System (ReFS) | No |
SMB 3.0 does not support EFS on shares with continuous availability capability.
Note
The winbase.h header defines FileEncryptionStatus as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows XP Professional [desktop apps only] |
| Minimum supported server | Windows Server 2003 [desktop apps only] |
| Target Platform | Windows |
| Header | winbase.h (include Windows.h) |
| Library | Advapi32.lib |
| DLL | Advapi32.dll |
See also
Feedback
Was this page helpful?
