|
- using System.Runtime.InteropServices;
- [DllImport("kernel32.dll")]
- public static extern int CreateFileA(LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode
- , LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes
- , HANDLE hTemplateFile);
- int Res = CreateFileA("\\My Documents\\test.txt", GENERIC_WRITE, 0, null, TRUNCATE_EXISTING, FILE_ATTRIBUTE_ARCHIVE, 0);
复制代码
这是我声明的源代码,但是提示说找不到类型或命名空间名称“DWORD”(是否缺少 using 指令或程序集引用?我还要引用什么东西呢?还有我声明的这个是不是有问题呢
|
|