Running a dll in kernel mode

332 views Asked by At

I'm just curious: I have a Windows dll which does some rendering/drawing jobs with openGL and then returns the result to the application.

Would it be faster if the code didn't run in user-mode but in kernel-mode? (no interruptions and higher priority)

1

There are 1 answers

0
Stewart On BEST ANSWER

Running in kernel mode doesn't get you higher priority, and it doesn't get rid of interruptions. Unless you ask it to, which you can do in user mode too for the most part.

The biggest problem you would face is that openGL is simply not available in kernel mode. It is a user mode API, that talks down into a device driver to implement some of its logic, but a lot of the logic is implemented entirely in user mode. It isn't like there is a syscall for every openGL API.

Even if you could overcome that (which you can't), as Erbureth mentions the security risk would be huge, debugging it would be a nightmare (have you ever used a kernel mode debugger?) and installing it would require admin privileges.

So all in all, no - it isn't possible.