how can i develop a simple minifilter driver that will specify a drive/directory (as input) from user-mode, for example "Z:\", and communicates with the kernel-mode and then display all the files/folders exists in the user-mode.

please i need a shoulder on this.. =(

and thanks in advance..

-noobDriverDev-

Not Sure how to do it in Kernel-Mode, but the same task can be accomplished in user-mode, here's a little something i just put together

#include <windows.h>
#include <iostream>
using namespace std;

void EnumDirectories(string start){
    WIN32_FIND_DATA info;
    int length= start.length()-1;
    string buffer=start,buffer2;
    HANDLE CurrentFile;
    
    if (start[length] != '\\' && start[length] != '/')
     buffer+="\\*";
    CurrentFile=FindFirstFile(buffer.c_str(),&info);
    if(CurrentFile==INVALID_HANDLE_VALUE)
      return;
    while(FindNextFile(CurrentFile,&info))
    {
        buffer2=info.cFileName;
        if(info.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY && buffer2.find("..")==string::npos)
        {
          buffer=start;
          length=buffer.length()-1;
          if (buffer[length] != '\\' && buffer[length] != '/')
           buffer+="\\"+buffer2;
          cout << buffer << endl;
          EnumDirectories(buffer);
    }
    }
    CloseHandle(CurrentFile);
}
int main()
{
 EnumDirectories("Z:");
 cin.get();
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.