[Task Scheduler] Ask for details about the return code 0XC000041D

Shane Shi 1 Reputation point
2022-09-20T08:03:50.187+00:00

Hello:

  1. I created a task schedule to start a program (winform exe), this application is about set keyboard hook (My setup is that the application is always running in the background to monitor keyboard events)
  2. When my computer goes to Hibernate for a while and then resume, I find that the application process has been terminated (Fail rate: 100%)
  3. Return code: 0XC000041D appears on the task schedule panel
  4. What does this return code mean?
  5. How do I set my task schedule to avoid this problem?

Notes:

  1. This problem does not exist when the application is not started through a task schedule (such as by running it manually or starting from regedit run);
  2. When the problem occurs, re-run the task in the task Schedule panel and the application will run normally again

My Task setting as below:
242874-1.png
242911-2.png
242854-3.png
242855-4.png

Developer technologies | Windows Forms
Windows development | Windows API - Win32
Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,766 Reputation points
    2022-09-21T10:31:14.387+00:00

    Hello

    Thank you for your question and reaching out. I can understand you are having issues related to Task scheduler.

    0xC000041d is a NTSTATUS code constant defined in Microsoft's ntstatus.h header file.

    Also, Please turn On verbose logging for this Application to see what happen when the Application was stopped.

    Alternatively, I will suggest you create Windows services to achieve keyboard behavior if it need be run all the time.

    -----------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.