验证文件目录的创建函数CreateDirectory();

函数原型:

CreateDirectoryW(
    _In_ LPCWSTR lpPathName,                                                   //路径
    _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes     //属性
    );

#ifdef UNICODE
#define CreateDirectory  CreateDirectoryW
#else
#define CreateDirectory  CreateDirectoryA
#endif // !UNICODE




推测之,createdirectory函数对/ \两个字符具有很好的兼容性

FindFirstFile函数不兼容后缀/ \,但对非后缀的兼容


其实根据目录的树状结构,按常理推导搜索和创建目录的方法也就了然了



猜你喜欢

转载自blog.csdn.net/dong1528313271/article/details/78732338
今日推荐