vinniew
asked on
FindFirstFile in kernel-mode?
I just want to do something like a findfirstfile in kernel-mode so that I can get a directory listing using wildcards. Is there a function already there that I can use to do this? I looked through the ntddk.h but I couldn't find anything. A quick snip of source code would be great. I'm using NT 4.0
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Okay, let me see if I understand you.
If I just include the FindFirstFile prototype in my single .c file that I'm using, the operating system will know what to do to find that function when it starts? Since this is kernel-mode, I won't need to include .libs or anything?
I'm new at this...
Thanks,
V
If I just include the FindFirstFile prototype in my single .c file that I'm using, the operating system will know what to do to find that function when it starts? Since this is kernel-mode, I won't need to include .libs or anything?
I'm new at this...
Thanks,
V
ASKER
I tried to use the FindFirstFile function in my device driver, but the compiler said no way. Are you sure you can use that win32 function in a device driver?
Thanks,
V
Thanks,
V
Well if I don't know if you can use the findfirstfile function provide by windows in the kernel-mode, but I don't think it will matter. In fact, its the kernel itself who defines it so it should work.
However, if it doesn't, you can still use the interrupt function which will do the same job.
Hope this help,
CpH
BTW:the import library is kernel32.lib and the header file is winbase.h.
However, if it doesn't, you can still use the interrupt function which will do the same job.
Hope this help,
CpH
BTW:the import library is kernel32.lib and the header file is winbase.h.
ASKER