能力值:
( LV2,RANK:10 )
2 楼
可以逆序查找‘\'然后复制的。
能力值:
( LV2,RANK:10 )
3 楼
参考
Process32First
Process32Next
能力值:
( LV2,RANK:10 )
4 楼
我就是觉得二楼的方法有点繁琐,,所以想问一下有没有新的办法,,,, 其实上面我的那个问题我自己解决了,,,,但是又发现了一个新的问题
MSDN上说PROCESSENTRY32结构的szExeFile字段包含了路径,,就像下面说的
szExeFile
Path and filename of the executable file for the process. 但是我用OB调试结果只有filename,比如C:\\system32\NOTEPAD.EXE
结果只有NOTAPAD.EXE,,
如下面一段程序
lstrcmp(pe.szExeFile,TEXT("NOTEPAD.EXE))
结果可以返回零,这是为什么,,,是MSDN说错了????请高人指教!!!
能力值:
( LV2,RANK:10 )
5 楼
你大小写弄对没?区分大小写的吧
是有个函数可以提取后面那部分的,不过忘了,晚上回去自己电脑上看看
能力值:
( LV2,RANK:10 )
6 楼
msdn:Null-terminated string that contains the path and file name of the executable file for the process
我以前还真没注意到这里。。等待答案
能力值:
(RANK:350 )
7 楼
你是下载的msdn吧,肯定是很老的版本了,在线查一下你就知道
590K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8X3#2K6k6r3&6Q4x3X3g2E0K9h3y4J5L8%4y4G2k6Y4c8Q4x3X3g2U0L8$3#2Q4x3V1k6W2L8W2)9J5k6s2g2K6i4K6u0r3L8r3W2T1M7X3q4J5P5g2)9J5c8X3#2K6y4U0R3@1z5o6x3&6i4K6t1^5g2W2y4Q4x3X3f1^5y4g2)9J5z5g2)9J5k6h3q4K6M7s2R3`.
szExeFile The name of the executable file for the process. To retrieve the full path to the executable file, call the Module32First function and check the szExePath member of the MODULEENTRY32 structure that is returned. However, if the calling process is a 32-bit process, you must call the QueryFullProcessImageName function to retrieve the full path of the executable file for a 64-bit process.
一楼那个问题,C语言有个现成的函数strrchr,自己写一个也是很简单的。
能力值:
( LV2,RANK:10 )
8 楼
就strrchr,简单方便,很多软件都用,如Adobe Reader
能力值:
( LV2,RANK:10 )
9 楼
哦。。原来我OUT了。
考虑下要不要用VS2008
能力值:
( LV2,RANK:10 )
10 楼
我是自己买光盘MSDN,,,是很老的那种版本,,,也许就是MSDN以前写错了吧,,,我反正调试过就只有可执行文件名,,和我的MSDN说的不一样!Moudle32First是可以取得全路径,,这个知道,,,,,