Cache Flushing

Hi,

I need to flush the file system cache to disk.
In order to use FlushFileBuffers(), I need to CreateFile(“\\.\C:”,
WRITE …)
but c: is locked for writing, so it can’t be flushed.

When using NtSetSystemInformation(0x15, …)
I can see that data is written to the disk (diskmon), but the routine is
asynchronous, so I can’t tell when synchronizing is done.

Is there another way to do this (i prefer user mode, but kernel is an
option).

Regards,
Dror.