Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2005, 02:33
dMITR0
 
Posts: n/a
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...
Reply With Quote
  #2  
Old 03-11-2005, 10:13
thewhiz
 
Posts: n/a
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 06:02.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )