SDK中的Createfile的用法
我的程序:
HANDLE hFile;
hFile = CreateFile("\\\\.\\D:", GENERIC_WRITE|GENERIC_READ, FILE_SHARE_WRITE, NULL
, CREATE_NEW, FILE_ATTRIBUTE_NORMAL
, NULL);
错误信息:
Compiling...
playwnd.cpp
D:\相关资料\IMPORTANT\PlayWnd\playwnd.cpp(494) : error C2664: 'CreateFileW' : cannot convert parameter 1 from 'char [7]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
Creating browse info file...
PlayWnd.exe - 1 error(s), 0 warning(s)
请高手指点下!!第一个参数路径应该怎么写才对?