FlushFileBuffers in non-privileged user mode



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?

.



Relevant Pages

  • Re: FlushFileBuffers in non-privileged user mode
    ... to flush file cache before the software end. ... FlushFileBuffers working in non-privileged user mode. ... flush file cache in user mode but no matter how hard I tried, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: FlushFileBuffers in non-privileged user mode
    ... to flush file cache before the software end. ... FlushFileBuffers working in non-privileged user mode. ... flush file cache in user mode but no matter how hard I tried, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: FlushFileBuffers in non-privileged user mode
    ... to flush file cache before the software end. ... FlushFileBuffers working in non-privileged user mode. ... flush file cache in user mode but no matter how hard I tried, ...
    (microsoft.public.win32.programmer.kernel)

Loading