WinCE 7.0 下如何获取全路径文件名的后缀?

一般大家会自己用字符串处理函数来获取,我以前也是这样做的。
今天看到一个使用系统 API 获取后缀的方法,使用的是 PathFindExtension()。
这个函数在 MSDN 的智能设备的帮助中竟然没有,但确实是可以在 WinCE 7.0 下使用的。

PathFindExtension Function  
--------------------------------------------------------------------------------  
Searches a path for an extension.   
Syntax  
LPTSTR PathFindExtension(LPCTSTR pPath);  
Parameters  
pPath  
[in] A pointer to a null-terminated string of maximum length MAX_PATH that contains the path that contains the extension for which to search.  
Return Value  
Returns the address of the "." preceding the extension within pPath if an extension is found, or the address of the trailing NULL character otherwise.   

 

posted @ 2016-02-19 14:57  91program  阅读(177)  评论(0编辑  收藏  举报