I was trying to build a "Kernel Debugger" for a Printer Driver (under Windows NT ver.4.0). Of course, before I would able to test my "Debugger" -- I have to compile it and link it to the actual printer driver. Then execute the driver to see if my debugger does its task. The problem arises when I used I/O functions (such as ZwCreateFile, ZwWriteFile, NtCreateFile, CloseHandle, etc. especially C standard functions). Everytime I used such functions, the printer driver itself could not able to print/generate output. Is it really possible to use file I/O functions when designing a Kernel Debugger? If yes, why I encountered the said problem? -- is there any alternative File I/O functions? If no, how could I possibly create a log file (since it is a required output of my Kernel Debugger).
There is a news group which handles questions on kernel mode debugging which is very active and will help you out. Walter Oney, author of several Microsoft Press books on driver development, frequently responds to questions on the group.