2

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.

user593747
  • 1,484
  • 4
  • 32
  • 52
  • [Task Scheduler Error and Success Constants](http://msdn.microsoft.com/en-us/library/aa383604(v=vs.85).aspx) – Bo Persson Jun 18 '11 at 04:30
  • 2
    Did you try google? The answer is the first link. On MSDN and Bing you need to prefix your query with 0x. – John Jun 18 '11 at 04:40
  • It may also help to paste some code. As Adam's answer says, the error means you are passing an invalid value. Perhaps that is where you should start looking. – Moo-Juice Jun 18 '11 at 07:02

3 Answers3

2

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

Adam Rosenfield
  • 390,455
  • 97
  • 512
  • 589
  • Thanks for the app link. But when run it says it cannot find a meaning to this error or others like 80070534 – user593747 Jun 18 '11 at 04:58
1

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.

J Kohn
  • 62
  • 5
0

It means that you are passing incorrect argument to pLogonTrigger

Sam
  • 822
  • 2
  • 8
  • 30