2. FILE_FLAG_WRITE_THROUGH symbol and function CreateFile FlushFileBuffers FlushViewOfFile () () what's the difference?
CodePudding user response:
Baidu search relevant keywords,CodePudding user response:
FILE_ATTRIBUTE_NORMAL says the most common file, is the defaultFILE_FLAG_WRITE_THROUGH is this logo can make applications at the same time of write cache directly to disk,
CodePudding user response:
CreateFileWindows core programming is about
CodePudding user response:
FILE_ATTRIBUTE_NORMAL refers to the default file attributes, unlike hidden, system, archive these attributes, but in fact, this parameter seemed to have system's approach, too, to 0FILE_FLAG_WRITE_THROUGH write operation will directly affect the disk file, not after the cache of process, usually write operation will not affect the real-time disk files, if does not include the logo, you can call FlushFileBuffers will cache data written to disk,