So I'm using the CreateFile function for a C# project that I'm currently working on. I've seen some examples that pass 0
as the argument for dwFlagsAndAttributes
.
While I'm reading through the documentation it doesn't specify what setting dwFlagsAndAttributes = 0
entails. Is this just a way of setting no flags or attributes?
The C# syntax for this method is:
[DllImport("kernel32.dll", SetLastError = true)]
static extern SafeFileHandle CreateFile(string lpFileName,
FileAccess dwDesiredAccess, uint dwShareMode, IntPtr lpSecurityAttributes,
FileMode dwCreationDisposition, uint dwFlagsAndAttributes,
IntPtr hTemplateFile);
Any help is greatly appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…