Hi, we need a way to copy the user "list" from a encrypted file template to
new files...
I have found this in the MSDN
(http://msdn.microsoft.com/en-us/library/aa364011.aspx)
Next i have addes this 2 namespaces
using Microsoft.Win32;
using System.Runtime.InteropServices;
Have this in the class space
[DllImport("Advapi32.dll", CharSet = CharSet.Auto)]
static public extern int DuplicateEncryptionInfoFile(string
sourceFile, string destinationFile, CreationDistribution
creationDistribution, int destinationFileAttributes, IntPtr
securityAttributes);
And with this i should copy the Metadata
DuplicateEncryptionInfoFile(@"C:\Temp\Source.xls",
@"C:\Temp\Target.xls", Win32.CreationDistribution.CreateNew,
Win32.FileAttributeNormal, IntPtr.Zero);
My problems are now how to get this objects?
- CreationDistribution in DLLImport
- Win32.CreationDistribution.CreateNew
- Win32.FileAttributeNormal
Or has anyone a working example how to copy the EFS encrypted userlist from
one file to another?
P.S.
the file should not be cleared...
thank you for any help
Volkan Senguel