From: Emil Dotchevski on 4 Feb 2010 22:00 I was hoping that someone would tell me why my program isn't working. Do I do something wrong? Did I miss something in the documentation? Is this a bug in XP? (again, the code works on Vista/7) Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode
From: Alexander Grigoriev on 4 Feb 2010 23:19 Do you want to terminate fully initialized processes? Then you won't have the problem. I think it only occurs if the process is terminated before it's fully initialized. "Emil Dotchevski" <emildotchevski(a)gmail.com> wrote in message news:a6bb8a1b-4e84-4c68-a3f3-fe5cfec671ec(a)m27g2000prl.googlegroups.com... >I was hoping that someone would tell me why my program isn't working. > Do I do something wrong? Did I miss something in the documentation? Is > this a bug in XP? (again, the code works on Vista/7) > > Emil Dotchevski > Reverge Studios, Inc. > http://www.revergestudios.com/reblog/index.php?n=ReCode
From: Hector Santos on 4 Feb 2010 23:45 Emil Dotchevski wrote: > I was hoping that someone would tell me why my program isn't working. > Do I do something wrong? Did I miss something in the documentation? Is > this a bug in XP? (again, the code works on Vista/7) > > Emil Dotchevski > Reverge Studios, Inc. > http://www.revergestudios.com/reblog/index.php?n=ReCode Rereading your original post, in general if you wanted more parent/child control, then you need to use a direct SPAWN rather than a SHELL. CreateProcess(szProgram, NULL,,,, <-- SPAWN CreateProcess(NULL, szProgram,,,, <-- SHELL In a SHELL, you are actually running the COMSPEC and you may not have to have complete control over the return code. In a SPAWN, it is direct and you have better control over the return code. In your case, you have a file with an INF extension, hence you have to use a SHELL here to allow windows to do a file association. That means you have a middle program and that would be the return code, if any. So that is the first thing to look at if you want better control of spawned processes and obtaining a return value. -- HLS
From: Stefan Kuhr on 5 Feb 2010 08:27 Hector, On 2/5/2010 5:45 AM, Hector Santos wrote: > Emil Dotchevski wrote: > >> I was hoping that someone would tell me why my program isn't working. >> Do I do something wrong? Did I miss something in the documentation? Is >> this a bug in XP? (again, the code works on Vista/7) >> >> Emil Dotchevski >> Reverge Studios, Inc. >> http://www.revergestudios.com/reblog/index.php?n=ReCode > > > Rereading your original post, in general if you wanted more parent/child > control, then you need to use a direct SPAWN rather than a SHELL. > > CreateProcess(szProgram, NULL,,,, <-- SPAWN > CreateProcess(NULL, szProgram,,,, <-- SHELL > > In a SHELL, you are actually running the COMSPEC and you may not have to > have complete control over the return code. In a SPAWN, it is direct and > you have better control over the return code. > No, this has nothing to do with starting the child process under a shell or not. The child process will be in both cases what you pass as szProgram and will be a direct child process of the calling process (the process that calls CreateProcess). -- S
From: Jonathan de Boyne Pollard on 5 Feb 2010 14:43
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <blockquote cite="mid:a6bb8a1b-4e84-4c68-a3f3-fe5cfec671ec(a)m27g2000prl.googlegroups.com" type="cite"> <p wrap="">I was hoping that someone would tell me why my program isn't working.<br> </p> </blockquote> <p>Someone did. M. "m" hit the nail exactly on the head. You're simply so determined to cling on to <a href="http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/put-down-the-chocolate-covered-banana.html">your chocolate-covered banana</a> that you're not even listening. M. "m" hit the nail on the head with respect to the chocolate-covered banana, too.<br> </p> </body> </html> |