WTSEnumerateProcesses失败,错误代码为1072 [英] WTSEnumerateProcesses failed with error code 1072

查看:812
本文介绍了WTSEnumerateProcesses失败,错误代码为1072的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个Windows服务应用程序(基于Dialog),并且从这个应用程序(来自OnInitDialog)我试图创建基于用户的exe的实例每个用户会话的文件(例如:为每个用户会话创建myTestUser.exe的实例)。这个
是通过使用"WTSEnumerateProcesses"来完成的。 API调用。在Windows XP(32位)中,WTSEnumerateProcesses API调用失败,错误代码为1072.请参阅以下示例代码:

I have a Windows Service application (Dialog based), and from this application (from OnInitDialog) I am trying to create the instance of user based exe file (example: creating instance of myTestUser.exe for each user session) for each user session. This is done by using "WTSEnumerateProcesses" API call. In Windows XP (32bit) WTSEnumerateProcesses API call failed with error code 1072. Kindly see the below sample code:

请你好我来解决这个问题。

Kindly help me to solve this issue.

谢谢,

R-VR

推荐答案

嗨R-VR,

感谢您在此处发布。

>> 这是通过使用" WTSEnumerateProcesses"完成的。 API调用。在Windows XP(32位)中,WTSEnumerateProcesses API调用失败,错误代码为1072.

错误1072表示指定的服务已标记为删除。根据这个
文档
WTSEnumerateProcesses方法具有以下限制。

error 1072 means the specified service has been marked for deletion. According to this document, WTSEnumerateProcesses method has these limitation as below.

支持的最低客户端 - Windows Vista

支持的最低服务器 - Windows Server 2008

Minimum supported client-Windows Vista
Minimum supported server-Windows Server 2008

因此它不再支持Windows XP。对不起。

So it doesn't support Windows XP any more. Sorry for that.

您可以使用
NtQuerySystemInformation 

LsaGetLogonSessionData

最好的问候,

Sera Yu


这篇关于WTSEnumerateProcesses失败,错误代码为1072的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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