Windows: Flush data and then drop locks