- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我写了一个小函数,可以加载一个的多个实例使用 CreateProcessWithLogonW 可执行
伪代码:
for ( i=0;i<100;i++)
{
sprintf(user,"user%i",i);
sprintf(pass,"pass%i",i);
if(NetUserGetInfo(user,pass)==NOT_FOUND) { NetUserAdd(user,pass); }
aaProcessCreateWithLogin("prog.exe",user,pass);
}
它工作正常,除了 ,它被限制为 32 个实例 -其他实例失败 -
是否有可以启动的用户数量限制同时处理 ?
谢谢
灰
最佳答案
来自documentation for CreateProcessWithLogonW :
There is a limit to the number of child processes that can be created by this function and run simultaneously. For example, on Windows XP, this limit is
MAXIMUM_WAIT_OBJECTS*4
. On Windows 2000, this limit isMAXIMUM_WAIT_OBJECTS
. However, you may not be able to create this many processes due to system-wide quota limits.
我已经在 Windows XP 上测试了 MAXIMUM_WAIT_OBJECTS
,它是 64,所以你可能达到了“系统范围的配额限制”。
This post建议使用 LogonUser 的组合和 CreateProcessAsUser而不是避免达到这些限制。
关于c - 最大 CreateProcessWithLogonW 和 NetUserAdd,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/820794/
我需要从 Windows 服务运行命令行应用程序,以另一个 Windows 用户身份执行它(通过提供域\用户 和密码)。 我以这种方式将 Windows API CreateProcessWithLo
我正在尝试启动一个程序,该程序以另一个用户的身份在 Windows 7 系统上使用 Win32 函数 CreateProcessWithLogon 启动另一个程序,但它返回错误 120,表示不支持的函
我有一个 Windows 服务(在 WinXP SP2 下),在 LocalSystem 帐户下运行,它使用 CreateProcessWithLogonW 启动进程。为了清理子进程,我尝试使用作业对
我正在使用来自 http://www.pinvoke.net/default.aspx/advapi32.createprocesswithlogonw 的代码.如何从标准输出中获取字符串形式的输出?
我有一段代码 if(!CreateProcessWithLogonW( szUserName, NULL, szPassword, LOGON_WITH_PROFILE
在测试框架中,进程 A 必须使用 CreateProcessWithLogonW API 在不同的用户凭据(例如,_limited_user)下启动进程 B。 lpStartupInfo->lpDes
我有一个 Windows 可执行文件,它是通过使用一组指定的用户详细信息调用 CreateProcessWithLogonW() 从服务中启动的。 这工作正常,并且该过程按预期开始。但是,当此进程尝试
大家好,我是编程新手。请有人帮助我。 我正在尝试从服务启动进程。我需要通过提示用户输入管理员凭据来启动新流程。 我正在尝试使用 CreateProcessWithLogonW()。 我使用的功能是否正
我写了一个程序,它应该像 RunAs 一样工作。它工作正常,但我有一个问题。如果我想运行例如 compmgmt.msc,那么我应该运行 mmc.exe 和 compmgmt.msc 作为它的参数。计算
我写了一个小函数,可以加载一个的多个实例使用 CreateProcessWithLogonW 可执行 伪代码: for ( i=0;i<100;i++) { sprintf(user,"user%
当我使用 CreateProcess() 创建一个进程时,我可以毫无问题地从它的 stdOut 中读取。为此,我创建了管道并通过 STARTUPINFO 将它们传递给进程。稍后我可以使用 ReadFi
所以我一直在开发一个小应用程序,它在某些时候以另一个用户的身份运行一个应用程序,我用 C 编写它并使用 MinGW GCC 编译器来编译和链接它。我的问题是,每当我尝试使用 WINAPI 函数 Cre
我正在使用以下代码创建具有其他用户安全权限的进程: CreateProcessWithLogonW( Username, Domain ? Domain : L".", Pas
我是一名优秀的程序员,十分优秀!