Thomas Steinbach wrote:
> Hello,
> 
> I have a small win32 program which starts
> and stops apache (win) as a program (not service)
> in a hidden console.

Well, httpd should work fine, but...

> void StartApache()
> {
> g_sia.dwFlags = STARTF_USESHOWWINDOW;
> g_sia.wShowWindow = SW_HIDE;

... does not generate a console window.  You have a new process
group and no cmd.exe process leader.  Try invoking with cmd.exe /c ...
and be certain you have STARTF_USESTDHANDLES as all good console
programs initially require some stdin/out/err, even if they are
pointing to an open NULL device handle.

Bill

Reply via email to