GetExternalKeyFromFile method of the Win32_EncryptableVolume class

The GetExternalKeyFromFile method of the Win32_EncryptableVolume class returns the external key from a file created by SaveExternalKeyToFile, given the location of that file.

Syntax

uint32 GetExternalKeyFromFile(
  [in]  string PathWithFileName,
  [out] uint8  ExternalKey[]
);

Parameters

PathWithFileName [in]

Type: string

A string that specifies the location of the file containing an external key.

ExternalKey [out]

Type: uint8[]

An array of bytes that is the 256-bit external key contained within the file that can be used to unlock a volume.

Return value

Type: uint32

This method returns one of the following codes or another error code if it fails.

Return code/value Description
S_OK
0 (0x0)
The method was successful.
E_INVALIDARG
2147942487 (0x80070057)
The file does not contain an external key.
ERROR_FILE_NOT_FOUND
2147942402 (0x80070002)
Cannot find file at the location specified.

 

Remarks

Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Windows SDK. They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).

Requirements

Requirement Value
Minimum supported client
Windows Vista Enterprise, Windows Vista Ultimate [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Namespace
Root\CIMV2\Security\MicrosoftVolumeEncryption
MOF
Win32_encryptablevolume.mof

See also

Win32_EncryptableVolume