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 6385161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:51:53+00:00 2026-05-25T02:51:53+00:00

(Visual Studio 2010 – C++) Hello, I’m trying to set a JOB to a

  • 0

(Visual Studio 2010 – C++)
Hello,

I’m trying to set a JOB to a process, but AssignProcessToJobObject returns ACCESS_DENIED and IsProcessInJob returns TRUE.

I call IsProcessInJob to a process immediately after call CreateProcess (Suspended) end tried call IsProcessInJob with my process (a few lines after main entry point) and it returns true.

void main()
{   
    BOOL bIsInJob;

    IsProcessInJob( GetCurrentProcess(), NULL, &bIsInJob );
    printf( "IsProcessInJob (me): %s\n", bIsInJob ? "true" : "false" ); 
// RET True ! inside and outside IDE
   ...

Someone saw it before?

Thanks for any help.
Sources:
Kill child process when parent process is killed
How do I automatically destroy child processes in Windows?

  • 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-25T02:51:54+00:00Added an answer on May 25, 2026 at 2:51 am

    I found.

    For some reason, my process was child of Explorer.exe then Explorer set a job to my process and the notepad (my child) inherits this job.

    I could not find until see with ProcessExplorer. I can not saw my process in process list, when i find below Winlogon->Explorer, i understood.

    Resolution: CREATE_BREAKAWAY_FROM_JOB

    if (!CreateProcess(L"c:\\windows\\system32\\notepad.exe",  L"", NULL, NULL, FALSE,
            CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &startupInfo, &processInformation))
    ...
    

    Thanks for your comments, patience and time.

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

Sidebar

Related Questions

I'm using the Visual Studio 2010 RC for .NET 4.0 and I'm trying to
Visual Studio 2010 crashes when loading Just trying to start Visual Studio 2010 to
Visual studio 2010 debugger automatically set breakpoint at the beginning of Main() on application
In Visual Studio 2010, I'm trying to build an COM-interop enabled C# project without
Using Visual Studio 2010 C++ with GMock. Trying to create a stub object for
Using Visual Studio 2010 C++ with googlemock. I'm trying to use a mock I
Visual Studio 2010 comes with a huge set of tools, most of which aren't
(Using Visual Studio 2010) I'm trying to create a shared_ptr of an existing class
My Visual Studio 2010 (C#) application is working, and I've been trying to deploy
Is Visual Studio 2010 compatible with MVC 1.0 Hello guys, Thanks for reading in

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.