R – Calling dll from kernel mode c++ windows

calldlldriverkernelload

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 address table from c++ or at link time?

Best Answer

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

Related Topic