开发者

StartService returns access denied for SERVICE_KERNEL_DRIVER

This thing has given me a really bad headache.

I'm trying to load a driver into a process using CreateService and SERVICE_ALL_ACCESS everything appears to be fine until I actually try and start the service using StartService it always fails with the ERROR_ACCESS_DENIED I'm running as administrator, I've baked a manifest into the app, I've tried the security attributes, it just wont work.

If anyone have any advice on how to debug this, I'm all ears...

I'm using a Windows 7 x64 SP1 installation, the latest DDK and if there was a problem with the driver itself I would get some other problem, right? not just, access denie开发者_高级运维d?

Something I'm debating but having trouble testing is if there are any user-mode/kernel-mode security consideration that I'm not handling. All this code is running in the same elevated process, yet, it will not work!

Can the driver in some way cause this error to happen?


Oh the horror, I should have seen this earlier, anyway, the error code from a call done in the driver was being propagated through the create service call. This return value just happened to be the same as the ERROR_ACCESS_DENIED but actually had to do with the driver not being properly signed.

This page explains what you need to do to be able to call certain functions within your driver.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜