Share via


DetectEncryptedVolumeEx 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. This function is identical to the DetectEncryptedVolume function, except that it has an additional VolumeSize parameter.

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 DetectEncryptedVolumeEx(
  _In_  PFILE_RESTORE_CONTEXT Context,
  _Out_ PDWORD                VolumeEncryptionInfo,
  _Out_ PULONGLONG            VolumeSize
);

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.

VolumeSize [out]

Receives the size, in bytes, of the volume. For partially encrypted volumes, VolumeSize is zero on return.

**Windows Server 2008 and Windows Vista: **VolumeSize is not zero on return for partially encrypted volumes.

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]
DLL
Fmapi.dll

See also

CreateFileRestoreContext

DetectEncryptedVolume