PathFileExists用法--使用#include <shlwapi.h>
2015-07-02 16:32
459 查看
BOOL PathFileExists(LPCTSTR pszPath);
Determines if a file exists.
---经检测,该函数可以检测文件或目录是否存在!
Remarks
This function tests the validity of the file and path. It works only on the local file system or on a remote drive that has been mounted to a drive letter. It will return FALSE for remote file paths that begin with the UNC names \\server or \\server\share.It will also return FALSE if a mounted remote drive is out of service.
为了使用PathFileExists(),必须包含头文件"shlwapi.h",范例代码如下:
__imp__PathFileExistsA@4
网上搜索了下,发现是因为没有添加相应的lib。添加lib的方法网上有不少,这里使用下面的方法:
或者在文件头部加入这行代码: #pragma comment(lib,"shlwapi.lib")
![](http://pic002.cnblogs.com/images/2010/91358/2010110909281357.jpg)
这样,就可以通过编译了!
相关文章推荐
- PullScrollView详解(三)——PullScrollView实现
- Android.mk简介
- MVC三个IOC注入点之Ninject使用示例
- getElementByID,getElementsByName,getElementsByTagName
- 学习使用chromium里的线程类(1)
- iOS开发最常用的第三方库
- poj 2965 The Pilots Brothers' refrigerator 枚举+组合 暑假第二题
- Java项目的*.java 文件打开后注释乱码问题解决办法。
- iOS开发 APP如何实现检测更新(百度)
- awk 筛选特定长度的序列
- 正确调用已知路径DLL的方法
- SSh 免密码登陆,还要求输入密码
- JavaScript & JQuery 交互式Web前端开发
- 一个非常简洁的 jQuery 图片轮播插件
- Objective-C(八、正式协议Protocol,非正式协议informal protocol)——iOS开发基础
- 黑马程序员---集合类
- 在LAMP环境下搭建PHP动态网页
- 理解CSS居中
- 编译frostwire项目jlibtorrent_jni.cpp
- unity3d 切换场景