WIN32 API里的CreateFile函数如何使用绝对路径
HANDLECreateFile(LPCTSTRlpFileName,//pointertonameofthefileDWORDdwDesiredAccess,//acc...
HANDLE CreateFile(
LPCTSTR lpFileName, // pointer to name of the file
DWORD dwDesiredAccess, // access (read-write) mode
DWORD dwShareMode, // share mode
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
// pointer to security attributes
DWORD dwCreationDisposition, // how to create
DWORD dwFlagsAndAttributes, // file attributes
HANDLE hTemplateFile // handle to file with attributes to
// copy
);
参数 lpFileName可以为相对路径如“aaa.txt”
但不能用绝对路径 如“c:\aaa.txt”怎么不办 展开
LPCTSTR lpFileName, // pointer to name of the file
DWORD dwDesiredAccess, // access (read-write) mode
DWORD dwShareMode, // share mode
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
// pointer to security attributes
DWORD dwCreationDisposition, // how to create
DWORD dwFlagsAndAttributes, // file attributes
HANDLE hTemplateFile // handle to file with attributes to
// copy
);
参数 lpFileName可以为相对路径如“aaa.txt”
但不能用绝对路径 如“c:\aaa.txt”怎么不办 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询