Task Scheduler Error Message: 80041318, Whats it m

2019-07-24 04:07发布

I have search & searched MSDN to find the definition of the HRESULT error with the value 80041318 but I cannot find it.

I am working in C++ Win32 attempting to schedule a task that will execute when the current user logs in. The function RegisterTaskDefinition() fails & returns this value.

Does anyone know what this error means & if possible does anyone know of the MSDN link to ALL the HRESULT ERRORS? I can find one link that has definitions of 7 errors.

3条回答
欢心
2楼-- · 2019-07-24 04:45

Using the error lookup tool that comes with VC++ (errlook.exe, or "Error Lookup" on the Tools menu in the IDE), the error message for 0x80041318 is "The task XML contains a value which is incorrectly formatted or out of range."

In the case of Task Scheduler 1.0, the error codes used are in WinError.h (search for SCHED_E_). I'm not sure if all the error used by TS 2.0 are there or not, though.

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-07-24 04:56

The Microsoft Exchange Server Error Code Look-up tool can be used to look up error codes. Don't let the name fool you—it's not just for Exchange, it's useful for program that generates Win32 error codes or HRESULTs. It searches all of the system header files for potential matches.

To look up error code 80041318, just run it from the command line like so:

C:\> err 80041318

In this case, a quick search yields this MSDN page, which says that error 80041318 is SCHED_E_INVALIDVALUE: "The task XML contains a value which is incorrectly formatted or out of range."

查看更多
ゆ 、 Hurt°
4楼-- · 2019-07-24 05:04

It means that you are passing incorrect argument to pLogonTrigger

查看更多
登录 后发表回答