阅读:1209回复:3
请教高手们一个问题。
char * ConvertPath( int drive, path_t ppath, char * fullpathname )
{ int i = 0; _QWORD result; // // Stick on the drive letter if we know it. // if( drive != 0xFF ) { fullpathname[0] = drive+\'A\'-1; fullpathname[1] = \':\'; i = 2; } UniToBCSPath( (unsigned char *)&fullpathname, ppath->pp_elements, 260 , BCS_WANSI, &result ); return( fullpathname ); } myIfsHook{ case IFSFN_FINDOPEN: ConvertPath( Drive, pir->ir_ppath, fullpathname );<---可以 case IFSFN_WRITE: ConvertPath( Drive, pir->ir_ppath, fullpathname );<---不可以 case IFSFN_OPEN: ConvertPath( Drive, pir->ir_ppath, fullpathname );<---不可以 } 为什么?? :( |
|
沙发#
发布于:2001-12-17 09:32
道理很简单。
read和write时 ,文件名根本没有被 ifsmgr 传下来。 你当然转化不出了。 [Edited on 12/17/01 by iamaf~1] |
|
|
板凳#
发布于:2001-12-17 09:46
但是Filemon里是可以取到的,只是代码我有点看不懂,呵呵。:(
|
|
地板#
发布于:2003-10-25 14:05
FileMon里面是继续执行了一个IFS的操作,根据文件的Handle得到文件的名称
|
|