Click to See Complete Forum and Search --> : about hide file use vxd, with details


wpkiller
March 11th, 2002, 12:07 PM
hi, glad to see you .

i have a problem that i know how to hide file in ifs hook findnext section. but i do not know how to hide the file in the findopen section, i think to call r0_findnextfile but it fails.

can you help me ??

switch (findopen)

int nRetVal = (*PrevIFSHookProc)(pfn,fn,Drive,ResType,CodePage,pir);
FilemonConvertPath( CONVERT_FINDOPEN, Drive, origir, CodePage, fullpathname );

// hide all files
if (ApplyHideFilters(fullpathname))
{
dout << "hide find open file " << fullpathname << endl;
pir->ir_error = ERROR_FILE_NOT_FOUND;
return pir->ir_error;
}
// hide current files
else
{
FilemonLogHash( Drive, pir->ir_fh, fullpathname );
dout << "find open - " << fullpathname << " - " << (DWORD)pir->ir_fh << endl;

_WIN32_FIND_DATA *finddata;
_QWORD result;
char fileFound[MAXPATHLEN];

fileFound[0] = 0;
finddata = (_WIN32_FIND_DATA *) origir->ir_data;
UniToBCS((unsigned char *)fileFound, finddata->cFileName, wstrlen(finddata->cFileName), MAXPATHLEN-1, BCS_WANSI, &result);
fileFound[ result.ddLower ] = 0;

dout << "find open found file " << fileFound << endl;

// want to hide current found file

//if it is FINDOPEN operation, we should return the next file.
//using IFSMgr_Ring0_FileIO to find the next file.
_WIN32_FIND_DATA_BCS bcsFindData;
BOOL retVal;

retVal=R0_FindNextFile(pir->ir_fh, &bcsFindData, (PWORD)&pir->ir_error);