问题描述
我在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
推荐答案
这篇关于XP服务,OpenProcess,ERROR_ACCESS_DENIED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!