Physically flush writes to hard drive

What Windows API calls can I use to physically flush writes to hard drive using Visual Basic?
LVL 1
TimelessAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Neal HartmanConnect With a Mentor Commented:
Private Declare Function FlushFileBuffers& Lib "kernel32" (ByVal hFile As Long)
0
 
amebaCommented:
  Reset ' vb statement
0
 
TimelessAuthor Commented:
The hFile parameter is presumably the file handle, is it the same one that I used in my VB Open statement?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
TimelessAuthor Commented:
The hFile parameter is presumably the file handle, is it the same one that I used in my VB Open statement?
0
 
amebaCommented:
No.
0
 
TimelessAuthor Commented:
http://support.microsoft.com/support/kb/articles/Q165/9/42.asp

....explains everything.

I managed to solve the problem simply by closing the file each time to force the write.
0
 
amebaCommented:
and then doing Reset.
0
All Courses

From novice to tech pro — start learning today.