mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[ROSAUTOTEST]
- Flush file buffers after writing to the crash recovery journal svn path=/trunk/; revision=55933
This commit is contained in:
parent
9624a85234
commit
04177d9d19
1 changed files with 4 additions and 0 deletions
|
@ -83,6 +83,7 @@ CJournaledTestList::SerializeIntoJournal(const string& String)
|
|||
{
|
||||
DWORD BytesWritten;
|
||||
WriteFile(m_hJournal, String.c_str(), String.size() + 1, &BytesWritten, NULL);
|
||||
FlushFileBuffers(m_hJournal);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,6 +99,7 @@ CJournaledTestList::SerializeIntoJournal(const wstring& String)
|
|||
{
|
||||
DWORD BytesWritten;
|
||||
WriteFile(m_hJournal, String.c_str(), (String.size() + 1) * sizeof(WCHAR), &BytesWritten, NULL);
|
||||
FlushFileBuffers(m_hJournal);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -169,6 +171,7 @@ CJournaledTestList::WriteInitialJournalFile()
|
|||
}
|
||||
|
||||
WriteFile(m_hJournal, &TerminatingNull, sizeof(TerminatingNull), &BytesWritten, NULL);
|
||||
FlushFileBuffers(m_hJournal);
|
||||
|
||||
CloseHandle(m_hJournal);
|
||||
m_hJournal = INVALID_HANDLE_VALUE;
|
||||
|
@ -248,6 +251,7 @@ CJournaledTestList::UpdateJournal()
|
|||
SetFilePointer(m_hJournal, sizeof(szJournalHeader), NULL, FILE_CURRENT);
|
||||
|
||||
WriteFile(m_hJournal, &m_ListIterator, sizeof(m_ListIterator), &BytesWritten, NULL);
|
||||
FlushFileBuffers(m_hJournal);
|
||||
|
||||
CloseHandle(m_hJournal);
|
||||
m_hJournal = NULL;
|
||||
|
|
Loading…
Reference in a new issue