According to the Microsoft docs, the error code ERROR_FILE_EXISTS should be returned when attempting to create a task that already exists. However, when I run the sample program to create a task more than once, I receive the error code E_ACCESSDENIED instead.
Based on my understanding, if I delete the .job file that was created, the error does not occur.
So why the API returns E_ACCESSDENIED rather than ERROR_FILE_EXISTS?
2