函数:
PathFindExtension(LPCSTR pszPath);
参数:
LPCSTR pszPath: 一个LPCSTR类型或其他char类型(如TCHAR类型)的字符串
功能:
获取路径或文件名中的文件扩展名
例如:
#include "windows.h"
#include "shlwapi.h"
int main(int argc, char* argv[])
{
LPCSTR hou_chuo;
PathFindExtension( “File.txt” ) = “.txt” //如"D:\\\\masm32\\\\lcd\\\\lcd.asm",则可返回".asm"的首址
printf("%s ",hou_chuo);
} //C语言_VC6.0
备注:
最小支持客户 Windows 2000 Professional, Windows XP
最小支持服务器 Windows 2000 Server
包含头文件 Shlwapi.h
Library Shlwapi.lib
DLL Shlwapi.dll (版本4.71或以后)
Unicode和ANSI名字 PathFindExtensionW (Unicode)和PathFindExtensionA (ANSI)