Partager via


DetectEncryptedVolume function

This function is obsolete in Windows 8, Windows Server 2012, and later. Determines whether the volume is encrypted with BitLocker technology. If the volume is encrypted, the function determines whether it is unlocked.

Note

FMAPI can only be used in the Windows Preinstallation Environment (WinPE) for Windows Vista, Windows Server 2008, and later. Applications that use FMAPI must license WinPE.

Syntax

BOOL WINAPI DetectEncryptedVolume(
  _In_  PFILE_RESTORE_CONTEXT Context,
  _Out_ PDWORD                VolumeEncryptionInfo
);

Parameters

Context [in]

A PFILE_RESTORE_CONTEXT pointer to the file restore context that was created by calling the CreateFileRestoreContext function.

VolumeEncryptionInfo [out]

A bitmask of flags that indicate the status of the volume. This value can be any combination of VOLUME_INFO_ENCRYPTED and VOLUME_INFO_LOCKED. For more information about these values, see File Management Constants.

Return value

If the function succeeds, the return value is TRUE.

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

In Windows 8, Windows Server 2012, and later, this function always returns FALSE, and GetLastError returns ERROR_NOT_SUPPORTED.

Remarks

This function is obsolete in Windows 8, Windows Server 2012, and later.

This function has no associated header file or import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to fmapi.dll.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
End of client support
Windows 7
End of server support
Windows Server 2008 R2
DLL
Fmapi.dll

See also

CreateFileRestoreContext

DetectEncryptedVolumeEx