Home > Software engineering >  Consult about CreateFile logo
Consult about CreateFile logo

Time:09-27

1. What's the use of CreateFile FILE_ATTRIBUTE_NORMAL logo? Document says this symbol can only be used alone, in what circumstances to specify it?

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 default
FILE_FLAG_WRITE_THROUGH is this logo can make applications at the same time of write cache directly to disk,

CodePudding user response:

CreateFile
Windows 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 0
FILE_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,
  • Related