作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以我使用 CreateFile function对于我目前正在处理的 C# 项目。我见过一些将 0
作为 dwFlagsAndAttributes
的参数传递的示例。
虽然我正在阅读文档,但它没有指定 dwFlagsAndAttributes = 0
需要什么设置。这只是一种不设置标志或属性的方式吗?
此方法的 C# 语法为:
[DllImport("kernel32.dll", SetLastError = true)]
static extern SafeFileHandle CreateFile(string lpFileName,
FileAccess dwDesiredAccess, uint dwShareMode, IntPtr lpSecurityAttributes,
FileMode dwCreationDisposition, uint dwFlagsAndAttributes,
IntPtr hTemplateFile);
非常感谢任何帮助。
最佳答案
Is this just a way of setting no flags or attributes?
没错。为作为一组位标志的参数传递 0
意味着没有设置任何标志。
关于c# - CreateFile 方法中的 dwFlagsAndAttributes = 0 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17997608/
所以我使用 CreateFile function对于我目前正在处理的 C# 项目。我见过一些将 0 作为 dwFlagsAndAttributes 的参数传递的示例。 虽然我正在阅读文档,但它没有指
我是一名优秀的程序员,十分优秀!