c - Maximum CreateProcessWithLogonW and NetUserAdd -
I wrote a small function that will load many examples of executables using CreateProcessWithLogonW
Pseudo-code:
for (i = 0; i & lt; 100; i ++) {sprintoff (user, "user% i", i); Sprintf (pass, "% i passed", i); If (NetUuserGetInfo (user, pass) == NOT_FOUND) {add netuser (user, pass); } Aap Procedure with login ("prog.exe", user, pass); } This works fine, except that it is limited to 32 instances - additional examples fail -
What is the limit of the number of users that have processes Can you launch the same time?
thanks
from
P>
There is a limit to the number of hair procedures that can be created by this function and can 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 process due to the system-wide quota range.
I have tested MAXIMUM_WAIT_OBJECTS on Windows XP and it is 64, so you're killing the 'system-wide quota range'.
Suggesting using combination instead of avoiding these limits.
Comments
Post a Comment