PathFileExists 函数可以用来查看一个文件或文件夹是否存在。
用法:
在头文件中
#include <shlwapi.h>
#pragma comment(lib,"Shlwapi.lib") //如果没有这行,会出现link错误
if (PathFileExists(strDBPath))
{
//存在
}
else //不存在
{
}
PathFileExists 函数可以用来查看一个文件或文件夹是否存在。
用法:
在头文件中
#include <shlwapi.h>
#pragma comment(lib,"Shlwapi.lib") //如果没有这行,会出现link错误
if (PathFileExists(strDBPath))
{
//存在
}
else //不存在
{
}