///////////////////////////////////////////////////////////////////////////////
// Name: AxeError.h
//
// Abstract: Define the error codes returned by AXE
//
// (c) Microsoft. All rights reserved.
///////////////////////////////////////////////////////////////////////////////
#if defined( _MSC_VER )
# pragma once
#endif  // _MSC_VER

#if !defined( AXEERROR_H )
#define AXEERROR_H

#if NTDDI_VERSION >= NTDDI_WIN7

//
// This file is only for C++ clients. C is not supported.
//
#if !defined( __cplusplus )
# error C++ compiler required
#endif  // C++


//
//  Values are 32 bit values laid out as follows:
//
//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
//  +---+-+-+-----------------------+-------------------------------+
//  |Sev|C|R|     Facility          |               Code            |
//  +---+-+-+-----------------------+-------------------------------+
//
//  where
//
//      Sev - is the severity code
//
//          00 - Success
//          01 - Informational
//          10 - Warning
//          11 - Error
//
//      C - is the Customer code flag
//
//      R - is a reserved bit
//
//      Facility - is the facility code
//
//      Code - is the facility's status code
//
//
// Define the facility codes
//
#define FACILITY_AXE                     0x4


//
// Define the severity codes
//


//
// MessageId: AXE_E_ALREADY_INIT
//
// MessageText:
//
// The axecore.dll library cannot be initialized by both an assessment and a solution.
//
#define AXE_E_ALREADY_INIT               0x80040200L

//
// MessageId: AXE_E_WORKLOAD_INIT
//
// MessageText:
//
// The axecore.dll library cannot be initialized by a solution in workload mode unless first initialized by an assessment.
//
#define AXE_E_WORKLOAD_INIT              0x80040201L

//
// MessageId: AXE_E_INTERNAL_ERROR
//
// MessageText:
//
// An unexpected internal error occurred.
//
#define AXE_E_INTERNAL_ERROR             0x80040202L

//
// MessageId: AXE_E_UNKNOWN_WIN32_ERROR
//
// MessageText:
//
// An unknown Win32 system error occurred.
//
#define AXE_E_UNKNOWN_WIN32_ERROR        0x80040203L

//
// MessageId: AXE_E_CO_NOT_INITIALIZED
//
// MessageText:
//
// CoInitialize has not been called.
//
#define AXE_E_CO_NOT_INITIALIZED         0x80040204L


//
// Solution errors
// (0x80041000 - 0x80041FFF)
//

//
// MessageId: AXE_E_BAD_MANIFEST
//
// MessageText:
//
// The manifest has bad or missing data.
//
#define AXE_E_BAD_MANIFEST               0x80041000L

//
// MessageId: AXE_E_PARAM_READ_ONLY
//
// MessageText:
//
// The specified parameter is read only.
//
#define AXE_E_PARAM_READ_ONLY            0xC0041001L

//
// MessageId: AXE_E_JOB_RUNNING
//
// MessageText:
//
// The engine is already running another job.
//
#define AXE_E_JOB_RUNNING                0x80041005L

//
// MessageId: AXE_E_JOB_NOT_RUNNING
//
// MessageText:
//
// The engine is currently not running a job.
//
#define AXE_E_JOB_NOT_RUNNING            0x80041006L

//
// MessageId: AXE_E_CANNOT_PUBLISH_BACK
//
// MessageText:
//
// Cannot publish results back to the original results location (see logs for more details). Please specify an alternate location to publish the results.
//
#define AXE_E_CANNOT_PUBLISH_BACK        0x80041007L

//
// MessageId: AXE_E_RESULTS_FOLDER_MISSING
//
// MessageText:
//
// The results file being opened is missing required assessment result sub folders.
//
#define AXE_E_RESULTS_FOLDER_MISSING     0x80041008L


//
// These errors are returned in the error field on the end assessment
// event.
//

//
// MessageId: AXE_E_ASSESSMENT_COULD_NOT_START
//
// MessageText:
//
// AXE could not start the assessment process.
//
#define AXE_E_ASSESSMENT_COULD_NOT_START 0x80041009L

//
// MessageId: AXE_E_ASSESSMENT_COULD_NOT_FINISH
//
// MessageText:
//
// AXE encountered an error while waiting for the assessment process to finish.
//
#define AXE_E_ASSESSMENT_COULD_NOT_FINISH 0x8004100AL

//
// MessageId: AXE_E_ASSESSMENT_COMPLETED_WITH_ERROR
//
// MessageText:
//
// This assessment process started successfully and exited normally, but according to its manifest, the exit code indicated the test failed.
//
#define AXE_E_ASSESSMENT_COMPLETED_WITH_ERROR 0x8004100BL

//
// MessageId: AXE_E_ASSESSMENT_RESULTS_INVALID
//
// MessageText:
//
// The assessment completed successfully, but there was an error processing the results file.
//
#define AXE_E_ASSESSMENT_RESULTS_INVALID 0x8004100CL

//
// MessageId: AXE_E_ASSESSMENT_CANCELED
//
// MessageText:
//
// The assessment was canceled.
//
#define AXE_E_ASSESSMENT_CANCELED        0x8004100DL

//
// MessageId: AXE_E_ASSESSMENT_TERMINATED
//
// MessageText:
//
// The assessment was terminated.
//
#define AXE_E_ASSESSMENT_TERMINATED      0x8004100FL

//
// MessageId: AXE_E_ASSESSMENT_CRASHED
//
// MessageText:
//
// The assessment crashed or caused a system reboot without first notifying AXE of an impending reboot.
//
#define AXE_E_ASSESSMENT_CRASHED         0x80041010L


//
// More Solution errors
//

//
// MessageId: AXE_E_SHELLEXECUTE_NOPROCESS
//
// MessageText:
//
// The assessment manifest described a ShellExecute() statement which did not result in a new process being created that AXE could wait for to finish.
//
#define AXE_E_SHELLEXECUTE_NOPROCESS     0x80041011L

//
// MessageId: AXE_E_QUEUED_APC_EVENTS
//
// MessageText:
//
// Cannot change the registered event handlers while there are outstanding APC calls on existing event handlers.
//
#define AXE_E_QUEUED_APC_EVENTS          0x80041012L


//
// These errors are returned in the error field on the end job
// event.
//

//
// MessageId: AXE_E_JOB_CANCELED
//
// MessageText:
//
// The job was canceled or terminated.
//
#define AXE_E_JOB_CANCELED               0x80041013L

//
// MessageId: AXE_E_JOB_ASSESSMENTS_FAILED
//
// MessageText:
//
// The job finished with one or more failed assessments.
//
#define AXE_E_JOB_ASSESSMENTS_FAILED     0x80041014L

//
// MessageId: AXE_E_JOB_ANOTHER_REBOOT_PENDING
//
// MessageText:
//
// The job could not start because another job is restarting.
//
#define AXE_E_JOB_ANOTHER_REBOOT_PENDING 0x80041015L

//
// MessageId: AXE_E_JOB_NO_REBOOT_PENDING
//
// MessageText:
//
// There is no job currently pending a restart.
//
#define AXE_E_JOB_NO_REBOOT_PENDING      0x80041016L

//
// MessageId: AXE_E_JOB_PREPARATION
//
// MessageText:
//
// The job could not be executed because some preparation step failed. Check logs for more details.
//
#define AXE_E_JOB_PREPARATION            0x80041017L

//
// MessageId: AXE_E_JOB_RESULTS_FAILED
//
// MessageText:
//
// There was an error generating or finalizing the results file.
//
#define AXE_E_JOB_RESULTS_FAILED         0x80041018L

//
// MessageId: AXE_E_JOB_ASSESSMENT_PREPARATION
//
// MessageText:
//
// There was an error preparing to execute an assessment.
//
#define AXE_E_JOB_ASSESSMENT_PREPARATION 0x80041019L

//
// MessageId: AXE_E_JOB_POSTEXECUTION
//
// MessageText:
//
// There was an error performing the job post execution action.
//
#define AXE_E_JOB_POSTEXECUTION          0x8004101AL

//
// MessageId: AXE_E_JOB_WAIT_TIMEOUT
//
// MessageText:
//
// The job could not be executed because the timeout elapsed before the current running job finished.
//
#define AXE_E_JOB_WAIT_TIMEOUT           0x8004101BL

//
// MessageId: AXE_E_JOB_CHANGED
//
// MessageText:
//
// The job automatically executed by the solution after a reboot was modified or not the same.
//
#define AXE_E_JOB_CHANGED                0x80041021L

//
// MessageId: AXE_E_JOB_RESTART_FAILED
//
// MessageText:
//
// The job restart state data was corrupt upon restart.
//
#define AXE_E_JOB_RESTART_FAILED         0x80041022L

//
// MessageId: AXE_E_JOB_RESTART_BADDATA
//
// MessageText:
//
// The job restart state data could not be saved while running.
//
#define AXE_E_JOB_RESTART_BADDATA        0x80041023L

//
// MessageId: AXE_E_JOB_RESTART_PENDING
//
// MessageText:
//
// The job is ending because the assessment is performing an expected restart.
//
#define AXE_E_JOB_RESTART_PENDING        0x80041024L

//
// MessageId: AXE_E_JOB_SOLUTION_RESTART
//
// MessageText:
//
// There was an error while trying to change solutions.
//
#define AXE_E_JOB_SOLUTION_RESTART       0x80041025L


//
// More Solution errors
//

//
// MessageId: AXE_E_PREEXECUTE_VALIDATION
//
// MessageText:
//
// A pre-execution requirement described in the assessment manifest was not met.
//
#define AXE_E_PREEXECUTE_VALIDATION      0x80041032L

//
// MessageId: AXE_E_SCREEN_LOCKED
//
// MessageText:
//
// The UI operation could not be performed because the screen was locked.
//
#define AXE_E_SCREEN_LOCKED              0x80041033L

//
// MessageId: AXE_E_BAD_JOB_VERSION
//
// MessageText:
//
// The schema version of the job is not supported.
//
#define AXE_E_BAD_JOB_VERSION            0x80041034L

//
// MessageId: AXE_E_BAD_ASSESSMENT_VERSION
//
// MessageText:
//
// The schema version of the assessment manifest doesn't support the features specified in the manifest.
//
#define AXE_E_BAD_ASSESSMENT_VERSION     0x80041035L

//
// MessageId: AXE_E_ASSESSMENT_CANT_ANALYZE
//
// MessageText:
//
// The assessment manifest doesn't support reanalysis.
//
#define AXE_E_ASSESSMENT_CANT_ANALYZE    0x80041036L

//
// MessageId: AXE_E_ASSESSMENT_NOT_FOUND_IN_RESULTS
//
// MessageText:
//
// The assessment manifest was not found in the job results file.
//
#define AXE_E_ASSESSMENT_NOT_FOUND_IN_RESULTS 0x80041037L

//
// MessageId: AXE_E_ASSESSMENT_CANT_ANALYZE_FAILURE
//
// MessageText:
//
// The assessment cannot be analyzed because it failed to complete successfully.
//
#define AXE_E_ASSESSMENT_CANT_ANALYZE_FAILURE 0x80041038L

//
// MessageId: AXE_E_RESULTS_NOTHING_TO_ANALYZE
//
// MessageText:
//
// The results cannot be analyzed because no assessment is marked to be analyzed.
//
#define AXE_E_RESULTS_NOTHING_TO_ANALYZE 0x80041039L

//
// MessageId: AXE_E_JOB_CANT_ANALYZE
//
// MessageText:
//
// The results do not contain any analyzable instances of an assessment in the specified job.
//
#define AXE_E_JOB_CANT_ANALYZE           0x8004103AL


//
// Assessment errors
// (0x80042000 - 0x80042FFF)
//

//
// MessageId: AXE_E_PARAM_CONVERSION_FAILED
//
// MessageText:
//
// The parameter cannot be converted to the requested type.
//
#define AXE_E_PARAM_CONVERSION_FAILED    0x80042000L

//
// MessageId: AXE_E_ENGINE_NOT_RUNNING
//
// MessageText:
//
// The assessment was not launched by AXE.
//
#define AXE_E_ENGINE_NOT_RUNNING         0x80042002L

//
// MessageId: AXE_E_PARAMETER_NOT_FOUND
//
// MessageText:
//
// The parameter that was requested does not exist.
//
#define AXE_E_PARAMETER_NOT_FOUND        0x80042008L

//
// MessageId: AXE_E_TRACING_NOT_SUPPORTED
//
// MessageText:
//
// The assessment is trying to use tracing APIs without setting the RequiresTracing property in its assessment manifest.
//
#define AXE_E_TRACING_NOT_SUPPORTED      0x80042009L

//
// MessageId: AXE_E_TRACING_NOT_RUNNING
//
// MessageText:
//
// The assessment is trying to stop tracing when no tracing session is currently running.
//
#define AXE_E_TRACING_NOT_RUNNING        0x8004200AL

//
// MessageId: AXE_E_TRACING_RUNNING
//
// MessageText:
//
// The assessment is trying to start tracing when a tracing session is already running.
//
#define AXE_E_TRACING_RUNNING            0x8004200BL

//
// MessageId: AXE_E_ASSESSMENT_MANIFEST_NOT_FOUND
//
// MessageText:
//
// A matching assessment manifest was not found.
//
#define AXE_E_ASSESSMENT_MANIFEST_NOT_FOUND 0x8004200CL

//
// MessageId: AXE_E_TRACE_PROFILE_NOT_FOUND
//
// MessageText:
//
// The specified trace profile was not found in the assessment's manifest.
//
#define AXE_E_TRACE_PROFILE_NOT_FOUND    0x8004200DL


#endif  // NTDDI_VERSION >= NTDDI_WIN7

#endif  // AXEERROR_H
