FlushFileBuffers in non-privileged user mode
- From: Hirakawa <hirakawa@xxxxxx>
- Date: Wed, 17 Oct 2007 01:30:46 -0700
Good day. I am currently working on an encryption software that need
to flush file cache before the software end.
While searching around for a solution, I got the source code of
SysInternals Sync and I learn that FlushFileBuffers is the right
function that can flush the file cache. Unfortunately, Sync does not
work in non-privileged user mode.
During my searching, I found another possible solution in this usenet
group which can enable CreateFile return a valid handle to let
FlushFileBuffers working in non-privileged user mode.
According to the message, FILE_FLAG_BACKUP_SEMANTICS is the key that
makes the CreateFile return a valid handle for FlushFileBuffers to
flush file cache in user mode but no matter how hard I tried, it
doesn't work at all.
Is there any other method I can try to make FlushFileBuffers works in
non-privileged user mode?
.
- Follow-Ups:
- Re: FlushFileBuffers in non-privileged user mode
- From: Kerem Gümrükcü
- Re: FlushFileBuffers in non-privileged user mode
- Prev by Date: Re: working set and console applications
- Next by Date: Re: Why VirtualAlloc succeeds in such condition??
- Previous by thread: Re: Can we do IO control like outportb() on WinXP/Vista from ap layer
- Next by thread: Re: FlushFileBuffers in non-privileged user mode
- Index(es):
Relevant Pages
|
Loading