EncryptFile (advapi32)
Last changed: -37.160.138.42

.
Summary
EncryptFile turns on file level system encryption for a specific file

C# Signature:

[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError=true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool EncryptFile(string filename);

VB Signature:

Declare Function EncryptFile Lib "advapi32.dll" (TODO) As TODO

User-Defined Types:

None.

Notes:

This requires that Windows supports Encrypted File System (EFS) which is only

supported under NTFS.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
Encryptfile on MSDN