PC Review


Reply
Thread Tools Rate Thread

Call to the function CreateFile() to create a file in an EFS encrypted directory.

 
 
devhil@gmail.com
Guest
Posts: n/a
 
      22nd Mar 2007
Hi,
I'am working on a backup/restore software, to backup and restore
encrypted files, I use the dedicated API (OpenEncryptedFileRaw,
ReadEncryptedFileRaw...).
My problem is to restore files not encrypted in a directory which has
the flag encrypted to ON.
I create my file with the system function CreateFile in a directory
with the encrypted flag to ON, and the file is automaticaly encrypted,
as it it say in documentation ( http://msdn2.microsoft.com/en-us/library/aa365005.aspx
). So to decrypt the file, before writting any data in it, I have to
close the file with the CloseHandle() function, decrypt the file with
the DecryptFile() function and reopen it with the CreateFile()
function.
I would prefer to be able to create the file not encrypted at the
first CreateFile() call, but I do not find any way to do it.
So is it possible ?

Note that the same thing appends using the CreateDirectory() function.

Thanks by advance.

Hilaire Verschuere.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGF0IEhvZmZlciBbTVNGVF0=?=
Guest
Posts: n/a
 
      28th Mar 2007
Call CreateFile with FILE_ATTRIBUTE_SYSTEM and remove the system attribute
later.

Thanks.
Pat
--
This posting is provided "AS IS" with no warranties, and confers no rights.


"(E-Mail Removed)" wrote:

> Hi,
> I'am working on a backup/restore software, to backup and restore
> encrypted files, I use the dedicated API (OpenEncryptedFileRaw,
> ReadEncryptedFileRaw...).
> My problem is to restore files not encrypted in a directory which has
> the flag encrypted to ON.
> I create my file with the system function CreateFile in a directory
> with the encrypted flag to ON, and the file is automaticaly encrypted,
> as it it say in documentation ( http://msdn2.microsoft.com/en-us/library/aa365005.aspx
> ). So to decrypt the file, before writting any data in it, I have to
> close the file with the CloseHandle() function, decrypt the file with
> the DecryptFile() function and reopen it with the CreateFile()
> function.
> I would prefer to be able to create the file not encrypted at the
> first CreateFile() call, but I do not find any way to do it.
> So is it possible ?
>
> Note that the same thing appends using the CreateDirectory() function.
>
> Thanks by advance.
>
> Hilaire Verschuere.
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call to the function CreateFile() to create a file in an EFS encrypted directory. devhil@gmail.com Microsoft Windows 2000 Security 1 28th Mar 2007 07:26 PM
Call to the function CreateFile() to create a file in an EFS encrypted directory. devhil@gmail.com Microsoft Windows 2000 1 28th Mar 2007 07:26 PM
Call to the function CreateFile() to create a file in an EFS encrypted directory. devhil@gmail.com Windows XP Security 1 28th Mar 2007 07:26 PM
CreateFile API call in VB .NET Terry Olsen Microsoft VB .NET 12 6th Nov 2005 03:33 AM
Createfile/Writefile for a file on a shared directory =?Utf-8?B?Tml0aW4gTmFyYW5n?= Microsoft Dot NET 0 28th Oct 2004 07:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:02 PM.