Platform SDK: Files and I/O

QueryRecoveryAgentsOnEncryptedFile

The QueryRecoveryAgentsOnEncryptedFile function retrieves a list of recovery agents for the specified file.

DWORD QueryRecoveryAgentsOnEncryptedFile(
  LPCWSTR lpFileName,                                 // file name
  PENCRYPTION_CERTIFICATE_HASH_LIST *pRecoveryAgents  // hash list
);

Parameters

lpFileName
[in] Pointer to a null-terminated Unicode string that specifies the name of the file to query.
pRecoveryAgents
[out] Receives a list of recovery agents, represented by a ENCRYPTION_CERTIFICATE_HASH_LIST structure.

Return Values

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a Win32 error code. For a complete list of error codes, see Error Codes or the Platform SDK header file WinError.h.

Remarks

When the list of recovery agents is no longer needed, free it by calling the FreeEncryptionCertificateHashList function.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winefs.h; include Windows.h.
  Library: Use Advapi32.lib.

See Also

File Systems Overview, File System Functions, ENCRYPTION_CERTIFICATE_HASH_LIST, FreeEncryptionCertificateHashList