|
I'm aware of ZwReadFile and company -- what I am after is a quick means of porting use rmode code to kernel mode by wrapping ZwReadFile, etc with fread, etc, thus being able to theoretically recompile user mode code into usable kernel code. Albeit, there are caveats a plenty, but it should work more often than not.
Ex:
#define FILE HANDLE
FILE *fopen(const char *path, const char *mode)
{
HANDLE file;
...
...
status = ZwCreateFile(&file, ...);
...
return file;
}
I am actually most of the way through implementing this approach as a library and then just linking it in to my drivers as needed.
|