[Autogenerated] the user mode Windows API for jobs is surprisingly small.
This makes it very comfortable to work with jobs.
So here are the main functions to use first we have the create job object
function that allows us to create a new job object.
Or optionally open job object handled to an existing job object,
assuming we know the name of that job object.
The open job object function only allows opening handle
to an existing job object by name.
If the job doesn't exist with that name, then the function simply fails.
And then once we have a handle to a job that we can control,
we can call the assigned process to job object function.
To add one or more processes to the job.
We have to call that multiple times each time with a different
process handle if we need more than one.
And then the super function really that provides a way to set up
all the various limits is set information.
Job object.
That function has been extended throughout the years to
support more and more job features.
As we'll see the next in the next video it's about providing the
appropriate enumeration value and an associated data structure
that contains the details of the limit.
The opposite function is query information.
Job object that allows us to query existing limits to query the list of
processes in the job and query the accounting information that the job
maintains regardless of any specific limits.
And finally,
there's the convenience function called terminate job object that terminates all
the processes in the job as it is as though you would call the terminate process
function for each specific processing the job.
So this is kind of a shortcut you can take in order to termine
all the processes in the job in one ______,
note that after such a call, the job is still very much alive.
It simply contains currently zero processes.
Let's take a look at how we can use this API API to do something useful.