RemoveUsersFromEncryptedFile function (Windows)

Switch View :
ScriptFree
RemoveUsersFromEncryptedFile function

Applies to: desktop apps only

Removes specified certificate hashes from a specified file.

Syntax

DWORD WINAPI RemoveUsersFromEncryptedFile(
  __in  LPCWSTR lpFileName,
  __in  PENCRYPTION_CERTIFICATE_HASH_LIST pHashes
);

Parameters

lpFileName [in]

The name of the file.

pHashes [in]

A pointer to an ENCRYPTION_CERTIFICATE_HASH_LIST structure that contains a list of certificate hashes to be removed from the file.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

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

Remarks

The RemoveUsersFromEncryptedFile function removes the specified certificate hashes if they exist in the specified file. If any of the certificate hashes are not found in the specified file, they are ignored and no error code is returned.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Winefs.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

ENCRYPTION_CERTIFICATE_HASH_LIST
File Encryption
File Management Functions

 

 

Send comments about this topic to Microsoft

Build date: 4/17/2012