![]() |
|
|
|
#1
|
|||
|
|||
|
NT/2k/XP Drivers Development Kit is all what you need. What are those wrappers for ?! If you want to be a friend of the system you have to use standart function for file read/write/open/close operations such as ZwReadFile/ZwWriteFile/ZwOpen/ZwClose. For memory de/allocation you could use ExFreePool/ExAllocatePoolWithTag. For fstat function probably you could use ZwQueryInformationFile.
I'm glad if it is somehow pointed to the source you wanted... |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|