首页
社区
课程
招聘
[分享]MyPathFindFileName
发表于: 2011-10-2 18:37 2483

[分享]MyPathFindFileName

2011-10-2 18:37
2483
////////////////////////////通过文件路径获得文件名字
char* _stdcall MyPathFileName(char *szPath)
{
        char szChar;
        char *szTemp=0;
        if(szPath==NULL)
                return szPath;
        while(*szPath)
        {
                szChar=*szPath;
                if(szChar==0x5C||szChar==0x3A||szChar==0x2F)
                {
                        szPath+=1;
                        szTemp=szPath;
                        szChar=*szTemp;
            if(szChar!=0||szChar!=0x5C||szChar!=0x2F)
                                ;
                }
                szPath=CharNext(szPath);
        }
        return szTemp;
}

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (4)
雪    币: 859
活跃值: (304)
能力值: ( LV11,RANK:180 )
在线值:
发帖
回帖
粉丝
2
char* __stdcall FilePathToName(char *szPath)
{
	int len, i ;

	len = lstrlen(szPath) ;
	i = len - 1 ;

	while(i >= 0 && szPath[i] != '\\')
		i -- ;
	if(i == len-1) 
		return NULL ;
	return (szPath + i + 1) ;
}
2011-10-2 19:29
0
雪    币: 278
活跃值: (709)
能力值: ( LV15,RANK:520 )
在线值:
发帖
回帖
粉丝
3
厉害,佩服!
2011-10-2 19:34
0
雪    币: 106
活跃值: (40)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
4
PathFindFileName
2011-10-2 22:18
0
雪    币: 458
活跃值: (421)
能力值: ( LV9,RANK:610 )
在线值:
发帖
回帖
粉丝
5
PathStripPath
2011-10-17 12:02
0
游客
登录 | 注册 方可回帖
返回
//