MakeSureDirectoryPathExists与CreateDirectory的区别
2016-09-28 10:43
573 查看
函数原型:
MakeSureDirectoryPathExists(
_In_ PCSTR DirPath
);
CreateDirectory(
_In_ LPCSTR lpPathName,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
二者的功能都是创建指定文件。
但是MakeSureDirectoryPathExists可以创建多级目录,如DirPath=“E:\\q\\w\\e”,如果q文件夹不存在也是可以创建成功的。而CreateDirectory只能创建一级目录。
如果想要使用MakeSureDirectoryPathExists,则必须包含头文件imagehlp.h,并链接imagehlp.lib。以下是下载地址:
32位: 64位:
Imagehlp32工具集 Imagehlp64工具集
当然也可以用dll。
MakeSureDirectoryPathExists(
_In_ PCSTR DirPath
);
CreateDirectory(
_In_ LPCSTR lpPathName,
_In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
二者的功能都是创建指定文件。
但是MakeSureDirectoryPathExists可以创建多级目录,如DirPath=“E:\\q\\w\\e”,如果q文件夹不存在也是可以创建成功的。而CreateDirectory只能创建一级目录。
如果想要使用MakeSureDirectoryPathExists,则必须包含头文件imagehlp.h,并链接imagehlp.lib。以下是下载地址:
32位: 64位:
Imagehlp32工具集 Imagehlp64工具集
当然也可以用dll。
相关文章推荐
- MakeSureDirectoryPathExists与CreateDirectory的区别
- MakeSureDirectoryPathExists和CreateDirectory的区别
- windows api一日一练(dbghelp sdk)-002-MakeSureDirectoryPathExists,SearchTreeForFile
- 使用 MakeSureDirectoryPathExists 迅速建立多级目录
- 使用 MakeSureDirectoryPathExists 迅速建立多级目录
- MakeSureDirectoryPathExists
- VC++ MFC 创建多级目录的方法 MakeSureDirectoryPathExists (另附 文件、目录操作类)
- 2014-03-14周五工作日志:检查指定目录是否存在的函数MakeSureDirectoryPathExists
- MakeSureDirectoryPathExists参数不能是正斜杠(“/”)
- 使用MakeSureDirectoryPathExists 创建多级目录
- 使用 MakeSureDirectoryPathExists 迅速建立多级目录
- MakeSureDirectoryPathExists检查目录是否存在
- ubuntu vmware xp Could not open /dev/vmmon: No such file or directory. Please make sure that the ke
- 关于make sure class name exists, is public, and has an empty constructor that is public解决办法
- (装载)C#中AppDomain.CurrentDomain.BaseDirectory与Application.StartupPath的区别
- AppDomain.CurrentDomain.BaseDirectory与Application.StartupPath的区别
- Unable to instantiate fragment com.viewpager.demo.FirstFragment: make sure class name exists, is pub
- Directory.GetCurrentDirectory和Application.StartupPath的区别
- 【C#遗补】获取应用程序路径之System.IO.Directory.GetCurrentDirectory和System.Windows.Forms.Application.StartupPath的区别
- The Microsoft Jet database engine could not find the object 'Supports'. Make sure the object exists