' ########################################################################################
' Microsoft Windows
' File: AgtErr.inc
' Contents: Error code definitions for Microsoft Agent
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_AgtErr_PBI)
#DEFINE PBX_AgtErr_PBI
%EQUATE `AGTERR_INC = 1
#INCLUDE ONCE "Core/Windows.inc"
'// Microsoft Agent Error Macros
MACRO AGENTERROR(x) = MAKE_SCODE(%SEVERITY_ERROR, %FACILITY_ITF, x + &H2000)
MACRO AGENTWARNING(x) = MAKE_SCODE(%SEVERITY_SUCCESS, %FACILITY_ITF, x + &H2000)
MACRO AGENTREQERROR(x) = MAKE_SCODE(%SEVERITY_ERROR, %FACILITY_ITF, x + &H2100)
MACRO AGENTPROVIDERERROR(x) = MAKE_SCODE(%SEVERITY_ERROR, %FACILITY_ITF, x + &H2200)
MACRO AGENTVOICEERROR(x) = MAKE_SCODE(%SEVERITY_ERROR, %FACILITY_ITF, x + &H2300)
MACRO AGENTAUDIOERROR(x) = MAKE_SCODE(%SEVERITY_ERROR, %FACILITY_ITF, x + &H2400)
MACRO AGENTCTLERROR(x) = MAKE_SCODE(%SEVERITY_ERROR, %FACILITY_ITF, x + &H2500)
MACRO AGENTEXTERROR(x) = MAKE_SCODE(%SEVERITY_ERROR, %FACILITY_ITF, x + &H2600)
'// Agent Errors
%EQUATE `AGENTERR_CLIENTINVALID = &H80042001& ' AGENTERROR(1)
%EQUATE `AGENTERR_CHARACTERINVALID = &H80042002& ' AGENTERROR(2)
%EQUATE `AGENTERR_ANIMATIONNOTFOUND = &H80042003& ' AGENTERROR(3)
%EQUATE `AGENTERR_STATENOTFOUND = &H80042004& ' AGENTERROR(4)
%EQUATE `AGENTERR_AUDIONOTFOUND = &H80042005& ' AGENTERROR(5) // No longer used
%EQUATE `AGENTERR_COMMANDNOTFOUND = &H80042006& ' AGENTERROR(6)
%EQUATE `AGENTERR_COMMANDALREADYINUSE = &H80042007& ' AGENTERROR(7)
%EQUATE `AGENTERR_MENUNOTFOUND = &H80042008& ' AGENTERROR(8)
%EQUATE `AGENTERR_LOSTCONNECTION = &H80042009& ' AGENTERROR(9)
%EQUATE `AGENTERR_CHARACTERNOTVISIBLE = &H8004200A& ' AGENTERROR(10)
%EQUATE `AGENTERR_CHARACTERALREADYLOADED = &H8004200B& ' AGENTERROR(11)
%EQUATE `AGENTERR_NOBALLOON = &H8004200C& ' AGENTERROR(12)
%EQUATE `AGENTERR_NOCOMMANDSWINDOW = &H8004200D& ' AGENTERROR(13)
%EQUATE `AGENTERR_INVALIDPREPARETYPE = &H8004200E& ' AGENTERROR(14)
%EQUATE `AGENTERR_INVALIDANIMATION = &H8004200F& ' AGENTERROR(15)
%EQUATE `AGENTERR_CANTMOVEDURINGDRAG = &H80042010& ' AGENTERROR(16)
%EQUATE `AGENTERR_CHARACTERNOTACTIVE = &H80042011& ' AGENTERROR(17)
%EQUATE `AGENTERR_LANGUAGENOTFOUND = &H80042012& ' AGENTERROR(18)
%EQUATE `AGENTERR_TTSLANGUAGENOTFOUND = &H80042013& ' AGENTERROR(19)
%EQUATE `AGENTERR_SRLANGUAGENOTFOUND = &H80042014& ' AGENTERROR(20)
%EQUATE `AGENTERR_LANGUAGEMISMATCH = &H80042015& ' AGENTERROR(21)
%EQUATE `AGENTERR_SPEAKINGDISABLED = &H80042016& ' AGENTERROR(22)
%EQUATE `AGENTERR_NOCHARACTERS = &H80042017& ' AGENTERROR(23)
%EQUATE `AGENTERR_DEFAULTCHARACTER = &H80042018& ' AGENTERROR(24)
'// Warnings
%EQUATE `AGENTWARNING_TTSENGINENOTFOUND = &H00042001& ' AGENTWARNING(1)
%EQUATE `AGENTWARNING_ONLYCLIENT = &H00042002& ' AGENTWARNING(2)
'// Request Errors
'MACRO IS_INTERRUPT_ERROR(hRes) = (hRes > AGENTREQERR_INTERRUPTEDLISTENKEY) AND (hres < AGENTREQERR_INTERRUPTEDUSER)
%EQUATE `AGENTREQERR_OBJECTNOTFOUND = &H80042101& ' AGENTREQERROR(1)
%EQUATE `AGENTREQERR_OBJECTINVALID = &H80042102& ' AGENTREQERROR(2)
%EQUATE `AGENTREQERR_CANTSTOPOTHERS = &H80042103& ' AGENTREQERROR(3)
%EQUATE `AGENTREQERR_CANTINTERRUPTSELF = &H80042104& ' AGENTREQERROR(4)
%EQUATE `AGENTREQERR_CANTWAITONSELF = &H80042105& ' AGENTREQERROR(5)
%EQUATE `AGENTREQERR_INVALIDBOOKMARK = &H80042106& ' AGENTREQERROR(6)
%EQUATE `AGENTREQERR_SUSPENDED = &H80042107& ' AGENTREQERROR(7) // No longer used
%EQUATE `AGENTREQERR_REMOVED = &H80042108& ' AGENTREQERROR(8)
%EQUATE `AGENTREQERR_INTERRUPTEDLISTENKEY = &H8004210A& ' AGENTREQERROR(10)
%EQUATE `AGENTREQERR_INTERRUPTEDHEARING = &H8004210B& ' AGENTREQERROR(11)
%EQUATE `AGENTREQERR_INTERRUPTEDCODE = &H8004210C& ' AGENTREQERROR(12)
%EQUATE `AGENTREQERR_INTERRUPTEDUSER = &H8004210D& ' AGENTREQERROR(13)
%EQUATE `AGENTREQERR_INVALIDLASTTAG = &H8004210E& ' AGENTREQERROR(14)
MACRO IS_INTERRUPT_ERROR(hRes) = (hRes > %AGENTREQERR_INTERRUPTEDLISTENKEY) AND (hres < %AGENTREQERR_INTERRUPTEDUSER)
'// Data Provider Errors
%EQUATE `AGENTPROVERROR_INIT = &H80042201& ' AGENTPROVIDERERROR(1)
%EQUATE `AGENTPROVERROR_CHARACTERVERSION = &H80042202& ' AGENTPROVIDERERROR(2)
%EQUATE `AGENTPROVERROR_VERSION = &H80042203& ' AGENTPROVIDERERROR(3)
%EQUATE `AGENTPROVERROR_MAGIC = &H80042204& ' AGENTPROVIDERERROR(4)
%EQUATE `AGENTPROVERROR_CHARACTERINVALID = &H80042205& ' AGENTPROVIDERERROR(5)
%EQUATE `AGENTPROVERROR_WAVEINVALID = &H80042206& ' AGENTPROVIDERERROR(6)
%EQUATE `AGENTPROVERROR_WAVECORRUPT = &H80042207& ' AGENTPROVIDERERROR(7)
%EQUATE `AGENTPROVERROR_MMIO = &H80042208& ' AGENTPROVIDERERROR(8)
%EQUATE `AGENTPROVERROR_PROTOCOL = &H80042209& ' AGENTPROVIDERERROR(9)
'// Audio Errors
%EQUATE `AGENTAUDIOERROR_DEVICE = &H80042401& ' AGENTAUDIOERROR(1)
%EQUATE `AGENTAUDIOERROR_TTSENUMERATOR = &H80042402& ' AGENTAUDIOERROR(2)
%EQUATE `AGENTAUDIOERROR_TTSSELECT = &H80042403& ' AGENTAUDIOERROR(3)
%EQUATE `AGENTAUDIOERROR_TTSREGISTER = &H80042404& ' AGENTAUDIOERROR(4)
%EQUATE `AGENTAUDIOERROR_TTSUNEXPECTED = &H80042405& ' AGENTAUDIOERROR(5)
%EQUATE `AGENTAUDIOERROR_LWVINIT = &H80042406& ' AGENTAUDIOERROR(6)
%EQUATE `AGENTAUDIOERROR_LWVREGISTER = &H80042407& ' AGENTAUDIOERROR(7)
%EQUATE `AGENTAUDIOERROR_LWVUNEXPECTED = &H80042408& ' AGENTAUDIOERROR(8)
'// Agent Control Errors
%EQUATE `AGENTCTLERROR_NOEVENTSAVAILABLE = &H80042501& ' AGENTCTLERROR(1) // No longer used
%EQUATE `AGENTCTLERROR_SERVERINIT = &H80042502& ' AGENTCTLERROR(2)
%EQUATE `AGENTCTLERROR_LANGUAGE = &H80042502& ' AGENTCTLERROR(3) // No longer used
'// Speech Recognition Errors
%EQUATE `AGENTVOICEERROR_COULDNTSTARTDEVICE = &H80042301& ' AGENTVOICEERROR(1)
%EQUATE `AGENTVOICEERROR_NOTINSTALLED = &H80042302& ' AGENTVOICEERROR(2)
%EQUATE `AGENTVOICEERROR_NOTINITIALIZED = &H80042303& ' AGENTVOICEERROR(3)
%EQUATE `AGENTVOICEERROR_INVALIDMENU = &H80042304& ' AGENTVOICEERROR(4)
%EQUATE `AGENTVOICEERROR_UNCLOSEDALTERNATIVE = &H80042305& ' AGENTVOICEERROR(5)
%EQUATE `AGENTVOICEERROR_UNCLOSEDOPTIONAL = &H80042306& ' AGENTVOICEERROR(6)
%EQUATE `AGENTVOICEERROR_UNEXPECTEDENDOFALTERNATIVE = &H80042307& ' AGENTVOICEERROR(7)
%EQUATE `AGENTVOICEERROR_UNEXPECTEDENDOFOPTIONAL = &H80042308& ' AGENTVOICEERROR(8)
%EQUATE `AGENTVOICEERROR_UNEXPECTEDALTERNATIVE = &H80042309& ' AGENTVOICEERROR(9)
%EQUATE `AGENTVOICEERROR_NOSRMODE = &H8004230A& ' AGENTVOICEERROR(10) // No longer used
%EQUATE `AGENTVOICEERROR_SRMODENOTFOUND = &H8004230B& ' AGENTVOICEERROR(11)
%EQUATE `AGENTVOICEERROR_SPEECHDISABLED = &H8004230C& ' AGENTVOICEERROR(12)
%EQUATE `AGENTVOICEERROR_UNEXPECTEDENDOFREPEAT = &H8004230D& ' AGENTVOICEERROR(13) // No longer used
%EQUATE `AGENTVOICEERROR_UNCLOSEDREPEAT = &H8004230E& ' AGENTVOICEERROR(14) // No longer used
%EQUATE `AGENTVOICEERROR_UNEXPECTEDREPEAT = &H8004230F& ' AGENTVOICEERROR(15)
'// Agent Extension Manager Errors
%EQUATE `AGENTEXTERROR_EXTNOTFOUND = &H80042601& ' AGENTEXTERROR(1)
%EQUATE `AGENTEXTERROR_INVALIDCLIENT = &H80042602& ' AGENTEXTERROR(2)
#ENDIF
