Hi,
Since you are doing this from a web browser helper object you should consider doing this with a job object. It allows you to put security restrictions on the child process that would otherwise not be available.
The best way to do this is to use the
CreateJobObject function[
^] and create a job object within the browser. Then you could call the
AssignProcessToJobObject function[
^] and assign the child process to the job. To have the child process close when the parent terminates... you would call the
SetInformationJobObject function[
^] with the JobObjectInfoClass of
JobObjectBasicLimitInformation
and pass a
JOBOBJECT_EXTENDED_LIMIT_INFORMATION structure[
^] with the LimitFlags containing the
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
bits set. You can prevent additional processes from being created by setting the
JOB_OBJECT_LIMIT_ACTIVE_PROCESS
bits and populating the
JOBOBJECT_BASIC_LIMIT_INFORMATION.ActiveProcessLimit
member
Best Wishes,
-David Delaune