views:

279

answers:

1

How would I go about calling a dll from kernel mode? I have tried making a custom lib file using multiple techniques but I cannot get anything to work. I have also researched on google but cannot seem to find anything. I was also curious if it was possible to create entries in the import addres table from c++ or at link time? Thanks for the help!

+2  A: 

The fundamental issue for a DLL in kernel mode is whether the DLL calls any user-mode code. If a DLL contains anything other than native kernel API calls, you'll get linker errors if you try to link your driver with it when you build (and the kernel wouldn't load it anyway)

check the following link Calling a DLL in a Kernel-Mode Driver

Edit:

Another useful link

DLLs in Kernel Mode Tim Roberts

Wael Dalloul
The dll is BOOTVID.DLL which is part of windows. I cannot find any lib for it because it is only used internally.