Expand Minimize

SetUserFileEncryptionKey function

Sets the user's current key to the specified certificate.

Syntax


DWORD WINAPI SetUserFileEncryptionKey(
  _In_  PENCRYPTION_CERTIFICATE pEncryptionCertificate
);

Parameters

pEncryptionCertificate [in]

A pointer to a certificate that will be the user's key. This parameter is a pointer to an ENCRYPTION_CERTIFICATE structure.

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

In Windows 8 and Windows Server 2012, this function is supported by the following technologies.

TechnologySupported

Server Message Block (SMB) 3.0 protocol

Yes

SMB 3.0 Transparent Failover (TFO)

No

SMB 3.0 with Scale-out File Shares (SO)

No

Cluster Shared Volume File System (CsvFS)

No

Resilient File System (ReFS)

No

 

SMB 3.0 does not support EFS on shares with continuous availability capability.

Requirements

Minimum supported client

Windows XP Professional [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winefs.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

ENCRYPTION_CERTIFICATE
File Encryption
File Management Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.