question

ShaneShi-7345 avatar image
0 Votes"
ShaneShi-7345 asked LimitlessTechnology-0326 answered

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

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





windows-11windows-apiwindows-forms
1.png (21.9 KiB)
2.png (12.3 KiB)
3.png (35.6 KiB)
4.png (36.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ShaneShi-7345 ,
Welcome to Microsoft Q&A!

Could you please provide details of this error like **this** in Windows Event Viewer .




1 Vote 1 ·

1 Answer

LimitlessTechnology-0326 avatar image
0 Votes"
LimitlessTechnology-0326 answered

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--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.