XP服务,OpenProcess,ERROR_ACCESS_DENIED [英] XP Services, OpenProcess, ERROR_ACCESS_DENIED

查看:109
本文介绍了XP服务,OpenProcess,ERROR_ACCESS_DENIED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在XP SP3系统上有两个Windows服务,它们以不同的进程运行.其中一个进程使用OpenProcess(PROCESS_QUERY_INFORMATION,FALSE,...)打开另一个进程.当进程/服务在LocalSystem帐户下运行时,这可以很好地工作,但是,如果我将两个服务都配置为从管理员用户帐户运行,则它们可以正常工作,但是OpenProcess不再起作用,并返回ERROR_ACCESS_DENIED.

我意识到我可以启用SE_DEBUG_NAME特权并再次执行OpenProcess,但这是唯一/正确的方法吗?如果将服务配置为在非管理员用户帐户下运行,OpenProcess是否可以在这种环境中工作?


I have two Windows services on XP SP3 system, which run as different processes. One of the processes uses OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ...) to open the other process. This works fine when processes/services are running under LocalSystem account, however if I configure both of the services to run from Administrator user account they do their regular work but OpenProcess is no longer working and ERROR_ACCESS_DENIED is returned.

I realize that I can enable SE_DEBUG_NAME privilege and have OpenProcess work again, however is this the only/the proper way? Is there any way for OpenProcess to work in such environment if services are configured to run under non-admin user account?


http://alax.info/blog/tag/directshow

推荐答案

您好
您可以在此处找到详细的答案:http://www.microsoft.com/msj/0398/Win320398.aspx
Elmü
Hello
You find a detailed answer here: http://www.microsoft.com/msj/0398/Win320398.aspx
Elmü


这篇关于XP服务,OpenProcess,ERROR_ACCESS_DENIED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆