Re: Problem described in kb article Q156484



Hello Kin,

Sorry, but better post in some programmers NG's.

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm

Hi Meinolf,

Thanks for your reply.

Below is the code segment where I spawn a new process in my
application:

=== code start

STARTUPINFO si;
SECURITY_ATTRIBUTES sa;
PROCESS_INFORMATION pi;
memset ((void*)&si, 0, sizeof (STARTUPINFO));
memset ((void*)&sa, 0, sizeof (SECURITY_ATTRIBUTES));
memset ((void*)&pi, 0, sizeof (PROCESS_INFORMATION));
sa.nLength = sizeof sa;
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = TRUE;
si.cb = sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
si.lpDesktop = "";
si.wShowWindow = SW_HIDE;
CreateProcess (NULL, cmd, NULL, NULL, TRUE,
NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE,
NULL, NULL, &si, &pi);
=== code end

CreateProcess() returns true, but the new process was never started.
However, a valid process handle is stored in the pi.hProcess field.
Calling

WaitForSingleObject (pi.hProcess, INFINITE);

returns immediately and the process return code (obtained by calling
GetExitCodeProcess()) is 128 (ERROR_WAIT_NO_CHILDREN). There is no
error event in the event log or error message being displayed
anywhere.

Given the information I've in hand, I believe I'm experiencing the
problem described in the kb article, but only my app has that problem
when running on some Windows 2000/2003 machines. Hence, that leads to
the questions in my first post.

Thanks
-Kin
"Meinolf Weber" wrote:

Hello Kin,

It is not easy with this article to cmoply with your problems. Please
describe in detail when you are seeing it on your servers and if
possible post the complete error message and also errors from the
event viewer.

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and
confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
Q156484



.



Relevant Pages