Re: FlushFileBuffers in non-privileged user mode
- From: Uwe Sieber <mail@xxxxxxxxxxxxx>
- Date: Wed, 17 Oct 2007 18:28:02 +0200
Hirakawa wrote:
On Oct 17, 8:00 pm, J de Boyne Pollard <j.deboynepoll...@xxxxxxxxx>
wrote:
H> Good day. I am currently working on an encryption software
H> that need to flush file cache before the software end.
Why do you think that it needs to do that?
H> Is there any other method I can try to make FlushFileBuffers
H> works in non-privileged user mode?
<URL:http://homepages.tesco.net./~J.deBoynePollard/FGA/put-down-the-
chocolate-covered-banana.html>
Hi, thank you for reply.
In Windows 2000 and XP user mode, if the working device that I am
using is a removable disk (either Flash Drive or HDD), I will have the
problem of data corruption or small file (<4k) lost. Therefore I need
to make sure that everything is flush back before user plug out or
safely remove the device.
'Safely remove' is good enough, it flushes for you.
To prevent caching problems at all just use FILE_FLAG_NO_BUFFERING
or FILE_FLAG_WRITE_THROUGH.
Uwe
.
- Follow-Ups:
- Re: FlushFileBuffers in non-privileged user mode
- From: Hirakawa
- Re: FlushFileBuffers in non-privileged user mode
- References:
- FlushFileBuffers in non-privileged user mode
- From: Hirakawa
- FlushFileBuffers in non-privileged user mode
- Prev by Date: Re: Problem impersonating a user with ImpersonateLoggedOnUser
- Next by Date: Re: working set and console applications
- Previous by thread: Re: FlushFileBuffers in non-privileged user mode
- Next by thread: Re: FlushFileBuffers in non-privileged user mode
- Index(es):
Loading