Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4082666
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:12:56+00:00 2026-05-20T18:12:56+00:00

In the context of Windows Job Objects , how can I get the job

  • 0

In the context of Windows Job Objects, how can I get the job object for the current process (in case it is in a job object)? The IsProcessInJob function lets me test whether a given process (e.g. the current one) is in a given (or any) job – but it doesn’t yield the handle of the matching job.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:12:57+00:00Added an answer on May 20, 2026 at 6:12 pm

    If you just want to find out what quotas/limits you are running under, or enumerate all the other processes in the job, you don’t need to get the Job object for the current process.

    You can call QueryInformationJobObject with NULL, which will be the Job object of the current process.

    • QueryInformationJobObject: http://msdn.microsoft.com/en-us/library/ms684925(VS.85).aspx
    • Job Objects: http://msdn.microsoft.com/en-us/library/ms684161(VS.85).aspx
    • Set job attributes using SetInformationJobObject

    To answer the specific question, call IsProcessInJob find out if you are in a job.

    You can find out everything about the Job by passing NULL to QueryInformationJobObject

    Your child processes will inherit your job automatically, unless you pass CREATE_BREAKAWAY_FROM_JOB and the job has JOB_OBJECT_LIMIT_BREAKAWAY_OK or JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK is set. In these cases you can assign the process to a new job if you wish.

    So without knowing the handle, you can find out all about your current Job, and assign child processes within the current job, or if you have permission, without the current job. I.e. you can do almost everything the handle would allow you to do.

    The only exception is duplicate it to another sibling process. If you need to do that you will have to have the parent process communicate the handle value to you somehow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The best way (IMO): test.add(Expect job not to be done., function(expect){ expect(job.done).toBe(false); }) This
Context We have a SharePoint site set up on a Windows Server 2008 VM
Context Language: C# Platform Version: Microsoft .Net Framework 4.0 Operating System: Windows 7 Professional
As the context menu for the desktop and explorer windows is disabled, I wanted
I am trying to invoke an ANT target from Windows (right-click) file context menu.
What's the difference between System.Drawing.Point and the System.Windows.Point ? In what context should which
In the context of a windows web service that's meant to run jobs, we
i want to extend contact context menu in windows mobile. when a user right
I'm attempting a somewhat complex operation on Windows Explorer context menu. I've got an
Environment Context Windows 7 ( hosted in Virtual Box 3.0.4 ) Visual Studio 2008

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.