xref: /reactos/sdk/include/dxsdk/dmerror.h (revision c2c66aff)
1*c2c66affSColin Finck /* DirectMusic Error Codes
2*c2c66affSColin Finck  *
3*c2c66affSColin Finck  * Copyright (C) 2003-2004 Rok Mandeljc
4*c2c66affSColin Finck  *
5*c2c66affSColin Finck  * This program is free software; you can redistribute it and/or
6*c2c66affSColin Finck  * modify it under the terms of the GNU Lesser General Public
7*c2c66affSColin Finck  * License as published by the Free Software Foundation; either
8*c2c66affSColin Finck  * version 2.1 of the License, or (at your option) any later version.
9*c2c66affSColin Finck  *
10*c2c66affSColin Finck  * This program is distributed in the hope that it will be useful,
11*c2c66affSColin Finck  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12*c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13*c2c66affSColin Finck  * Lesser General Public License for more details.
14*c2c66affSColin Finck  *
15*c2c66affSColin Finck  * You should have received a copy of the GNU Lesser General Public
16*c2c66affSColin Finck  * License along with this program; if not, write to the Free Software
17*c2c66affSColin Finck  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18*c2c66affSColin Finck  */
19*c2c66affSColin Finck 
20*c2c66affSColin Finck #ifndef __WINE_DMUSIC_ERROR_H
21*c2c66affSColin Finck #define __WINE_DMUSIC_ERROR_H
22*c2c66affSColin Finck 
23*c2c66affSColin Finck /*****************************************************************************
24*c2c66affSColin Finck  * Error code handling
25*c2c66affSColin Finck  */
26*c2c66affSColin Finck #define FACILITY_DIRECTMUSIC 0x878
27*c2c66affSColin Finck #define DMUS_ERRBASE 0x1000
28*c2c66affSColin Finck 
29*c2c66affSColin Finck #ifndef MAKE_HRESULT
30*c2c66affSColin Finck #define MAKE_HRESULT(sev,fac,code) \
31*c2c66affSColin Finck     ((HRESULT) (((ULONG)(sev)<<31) | ((ULONG)(fac)<<16) | ((ULONG)(code))) )
32*c2c66affSColin Finck #endif
33*c2c66affSColin Finck 
34*c2c66affSColin Finck #define MAKE_DMHRESULTSUCCESS(code)  MAKE_HRESULT(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
35*c2c66affSColin Finck #define MAKE_DMHRESULTERROR(code)    MAKE_HRESULT(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
36*c2c66affSColin Finck 
37*c2c66affSColin Finck /*****************************************************************************
38*c2c66affSColin Finck  * Error codes
39*c2c66affSColin Finck  */
40*c2c66affSColin Finck 
41*c2c66affSColin Finck #define DMUS_S_PARTIALLOAD                    MAKE_DMHRESULTSUCCESS(0x091)
42*c2c66affSColin Finck #define DMUS_S_PARTIALDOWNLOAD                MAKE_DMHRESULTSUCCESS(0x092)
43*c2c66affSColin Finck #define DMUS_S_REQUEUE                        MAKE_DMHRESULTSUCCESS(0x200)
44*c2c66affSColin Finck #define DMUS_S_FREE                           MAKE_DMHRESULTSUCCESS(0x201)
45*c2c66affSColin Finck #define DMUS_S_END                            MAKE_DMHRESULTSUCCESS(0x202)
46*c2c66affSColin Finck #define DMUS_S_STRING_TRUNCATED               MAKE_DMHRESULTSUCCESS(0x210)
47*c2c66affSColin Finck #define DMUS_S_LAST_TOOL                      MAKE_DMHRESULTSUCCESS(0x211)
48*c2c66affSColin Finck #define DMUS_S_OVER_CHORD                     MAKE_DMHRESULTSUCCESS(0x212)
49*c2c66affSColin Finck #define DMUS_S_UP_OCTAVE                      MAKE_DMHRESULTSUCCESS(0x213)
50*c2c66affSColin Finck #define DMUS_S_DOWN_OCTAVE                    MAKE_DMHRESULTSUCCESS(0x214)
51*c2c66affSColin Finck #define DMUS_S_NOBUFFERCONTROL                MAKE_DMHRESULTSUCCESS(0x215)
52*c2c66affSColin Finck #define DMUS_S_GARBAGE_COLLECTED              MAKE_DMHRESULTSUCCESS(0x216)
53*c2c66affSColin Finck 
54*c2c66affSColin Finck #define DMUS_E_DRIVER_FAILED                  MAKE_DMHRESULTERROR(0x0101)
55*c2c66affSColin Finck #define DMUS_E_PORTS_OPEN                     MAKE_DMHRESULTERROR(0x0102)
56*c2c66affSColin Finck #define DMUS_E_DEVICE_IN_USE                  MAKE_DMHRESULTERROR(0x0103)
57*c2c66affSColin Finck #define DMUS_E_INSUFFICIENTBUFFER             MAKE_DMHRESULTERROR(0x0104)
58*c2c66affSColin Finck #define DMUS_E_BUFFERNOTSET                   MAKE_DMHRESULTERROR(0x0105)
59*c2c66affSColin Finck #define DMUS_E_BUFFERNOTAVAILABLE             MAKE_DMHRESULTERROR(0x0106)
60*c2c66affSColin Finck #define DMUS_E_NOTADLSCOL                     MAKE_DMHRESULTERROR(0x0108)
61*c2c66affSColin Finck #define DMUS_E_INVALIDOFFSET                  MAKE_DMHRESULTERROR(0x0109)
62*c2c66affSColin Finck #define DMUS_E_ALREADY_LOADED                 MAKE_DMHRESULTERROR(0x0111)
63*c2c66affSColin Finck #define DMUS_E_INVALIDPOS                     MAKE_DMHRESULTERROR(0x0113)
64*c2c66affSColin Finck #define DMUS_E_INVALIDPATCH                   MAKE_DMHRESULTERROR(0x0114)
65*c2c66affSColin Finck #define DMUS_E_CANNOTSEEK                     MAKE_DMHRESULTERROR(0x0115)
66*c2c66affSColin Finck #define DMUS_E_CANNOTWRITE                    MAKE_DMHRESULTERROR(0x0116)
67*c2c66affSColin Finck #define DMUS_E_CHUNKNOTFOUND                  MAKE_DMHRESULTERROR(0x0117)
68*c2c66affSColin Finck #define DMUS_E_INVALID_DOWNLOADID             MAKE_DMHRESULTERROR(0x0119)
69*c2c66affSColin Finck #define DMUS_E_NOT_DOWNLOADED_TO_PORT         MAKE_DMHRESULTERROR(0x0120)
70*c2c66affSColin Finck #define DMUS_E_ALREADY_DOWNLOADED             MAKE_DMHRESULTERROR(0x0121)
71*c2c66affSColin Finck #define DMUS_E_UNKNOWN_PROPERTY               MAKE_DMHRESULTERROR(0x0122)
72*c2c66affSColin Finck #define DMUS_E_SET_UNSUPPORTED                MAKE_DMHRESULTERROR(0x0123)
73*c2c66affSColin Finck #define DMUS_E_GET_UNSUPPORTED                MAKE_DMHRESULTERROR(0x0124)
74*c2c66affSColin Finck #define DMUS_E_NOTMONO                        MAKE_DMHRESULTERROR(0x0125)
75*c2c66affSColin Finck #define DMUS_E_BADARTICULATION                MAKE_DMHRESULTERROR(0x0126)
76*c2c66affSColin Finck #define DMUS_E_BADINSTRUMENT                  MAKE_DMHRESULTERROR(0x0127)
77*c2c66affSColin Finck #define DMUS_E_BADWAVELINK                    MAKE_DMHRESULTERROR(0x0128)
78*c2c66affSColin Finck #define DMUS_E_NOARTICULATION                 MAKE_DMHRESULTERROR(0x0129)
79*c2c66affSColin Finck #define DMUS_E_NOTPCM                         MAKE_DMHRESULTERROR(0x012A)
80*c2c66affSColin Finck #define DMUS_E_BADWAVE                        MAKE_DMHRESULTERROR(0x012B)
81*c2c66affSColin Finck #define DMUS_E_BADOFFSETTABLE                 MAKE_DMHRESULTERROR(0x012C)
82*c2c66affSColin Finck #define DMUS_E_UNKNOWNDOWNLOAD                MAKE_DMHRESULTERROR(0x012D)
83*c2c66affSColin Finck #define DMUS_E_NOSYNTHSINK                    MAKE_DMHRESULTERROR(0x012E)
84*c2c66affSColin Finck #define DMUS_E_ALREADYOPEN                    MAKE_DMHRESULTERROR(0x012F)
85*c2c66affSColin Finck #define DMUS_E_ALREADYCLOSED                  MAKE_DMHRESULTERROR(0x0130)
86*c2c66affSColin Finck #define DMUS_E_SYNTHNOTCONFIGURED             MAKE_DMHRESULTERROR(0x0131)
87*c2c66affSColin Finck #define DMUS_E_SYNTHACTIVE                    MAKE_DMHRESULTERROR(0x0132)
88*c2c66affSColin Finck #define DMUS_E_CANNOTREAD                     MAKE_DMHRESULTERROR(0x0133)
89*c2c66affSColin Finck #define DMUS_E_DMUSIC_RELEASED                MAKE_DMHRESULTERROR(0x0134)
90*c2c66affSColin Finck #define DMUS_E_BUFFER_EMPTY                   MAKE_DMHRESULTERROR(0x0135)
91*c2c66affSColin Finck #define DMUS_E_BUFFER_FULL                    MAKE_DMHRESULTERROR(0x0136)
92*c2c66affSColin Finck #define DMUS_E_PORT_NOT_CAPTURE               MAKE_DMHRESULTERROR(0x0137)
93*c2c66affSColin Finck #define DMUS_E_PORT_NOT_RENDER                MAKE_DMHRESULTERROR(0x0138)
94*c2c66affSColin Finck #define DMUS_E_DSOUND_NOT_SET                 MAKE_DMHRESULTERROR(0x0139)
95*c2c66affSColin Finck #define DMUS_E_ALREADY_ACTIVATED              MAKE_DMHRESULTERROR(0x013A)
96*c2c66affSColin Finck #define DMUS_E_INVALIDBUFFER                  MAKE_DMHRESULTERROR(0x013B)
97*c2c66affSColin Finck #define DMUS_E_WAVEFORMATNOTSUPPORTED         MAKE_DMHRESULTERROR(0x013C)
98*c2c66affSColin Finck #define DMUS_E_SYNTHINACTIVE                  MAKE_DMHRESULTERROR(0x013D)
99*c2c66affSColin Finck #define DMUS_E_DSOUND_ALREADY_SET             MAKE_DMHRESULTERROR(0x013E)
100*c2c66affSColin Finck #define DMUS_E_INVALID_EVENT                  MAKE_DMHRESULTERROR(0x013F)
101*c2c66affSColin Finck #define DMUS_E_UNSUPPORTED_STREAM             MAKE_DMHRESULTERROR(0x0150)
102*c2c66affSColin Finck #define DMUS_E_ALREADY_INITED                 MAKE_DMHRESULTERROR(0x0151)
103*c2c66affSColin Finck #define DMUS_E_INVALID_BAND                   MAKE_DMHRESULTERROR(0x0152)
104*c2c66affSColin Finck #define DMUS_E_TRACK_HDR_NOT_FIRST_CK         MAKE_DMHRESULTERROR(0x0155)
105*c2c66affSColin Finck #define DMUS_E_TOOL_HDR_NOT_FIRST_CK          MAKE_DMHRESULTERROR(0x0156)
106*c2c66affSColin Finck #define DMUS_E_INVALID_TRACK_HDR              MAKE_DMHRESULTERROR(0x0157)
107*c2c66affSColin Finck #define DMUS_E_INVALID_TOOL_HDR               MAKE_DMHRESULTERROR(0x0158)
108*c2c66affSColin Finck #define DMUS_E_ALL_TOOLS_FAILED               MAKE_DMHRESULTERROR(0x0159)
109*c2c66affSColin Finck #define DMUS_E_ALL_TRACKS_FAILED              MAKE_DMHRESULTERROR(0x0160)
110*c2c66affSColin Finck #define DMUS_E_NOT_FOUND                      MAKE_DMHRESULTERROR(0x0161)
111*c2c66affSColin Finck #define DMUS_E_NOT_INIT                       MAKE_DMHRESULTERROR(0x0162)
112*c2c66affSColin Finck #define DMUS_E_TYPE_DISABLED                  MAKE_DMHRESULTERROR(0x0163)
113*c2c66affSColin Finck #define DMUS_E_TYPE_UNSUPPORTED               MAKE_DMHRESULTERROR(0x0164)
114*c2c66affSColin Finck #define DMUS_E_TIME_PAST                      MAKE_DMHRESULTERROR(0x0165)
115*c2c66affSColin Finck #define DMUS_E_TRACK_NOT_FOUND                MAKE_DMHRESULTERROR(0x0166)
116*c2c66affSColin Finck #define DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT     MAKE_DMHRESULTERROR(0x0167)
117*c2c66affSColin Finck #define DMUS_E_NO_MASTER_CLOCK                MAKE_DMHRESULTERROR(0x0170)
118*c2c66affSColin Finck #define DMUS_E_LOADER_NOCLASSID               MAKE_DMHRESULTERROR(0x0180)
119*c2c66affSColin Finck #define DMUS_E_LOADER_BADPATH                 MAKE_DMHRESULTERROR(0x0181)
120*c2c66affSColin Finck #define DMUS_E_LOADER_FAILEDOPEN              MAKE_DMHRESULTERROR(0x0182)
121*c2c66affSColin Finck #define DMUS_E_LOADER_FORMATNOTSUPPORTED      MAKE_DMHRESULTERROR(0x0183)
122*c2c66affSColin Finck #define DMUS_E_LOADER_FAILEDCREATE            MAKE_DMHRESULTERROR(0x0184)
123*c2c66affSColin Finck #define DMUS_E_LOADER_OBJECTNOTFOUND          MAKE_DMHRESULTERROR(0x0185)
124*c2c66affSColin Finck #define DMUS_E_LOADER_NOFILENAME              MAKE_DMHRESULTERROR(0x0186)
125*c2c66affSColin Finck #define DMUS_E_INVALIDFILE                    MAKE_DMHRESULTERROR(0x0200)
126*c2c66affSColin Finck #define DMUS_E_ALREADY_EXISTS                 MAKE_DMHRESULTERROR(0x0201)
127*c2c66affSColin Finck #define DMUS_E_OUT_OF_RANGE                   MAKE_DMHRESULTERROR(0x0202)
128*c2c66affSColin Finck #define DMUS_E_SEGMENT_INIT_FAILED            MAKE_DMHRESULTERROR(0x0203)
129*c2c66affSColin Finck #define DMUS_E_ALREADY_SENT                   MAKE_DMHRESULTERROR(0x0204)
130*c2c66affSColin Finck #define DMUS_E_CANNOT_FREE                    MAKE_DMHRESULTERROR(0x0205)
131*c2c66affSColin Finck #define DMUS_E_CANNOT_OPEN_PORT               MAKE_DMHRESULTERROR(0x0206)
132*c2c66affSColin Finck #define DMUS_E_CANNOT_CONVERT                 MAKE_DMHRESULTERROR(0x0207)
133*c2c66affSColin Finck #define DMUS_E_DESCEND_CHUNK_FAIL             MAKE_DMHRESULTERROR(0x0210)
134*c2c66affSColin Finck #define DMUS_E_NOT_LOADED                     MAKE_DMHRESULTERROR(0x0211)
135*c2c66affSColin Finck #define DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE   MAKE_DMHRESULTERROR(0x0213)
136*c2c66affSColin Finck #define DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE     MAKE_DMHRESULTERROR(0x0214)
137*c2c66affSColin Finck #define DMUS_E_SCRIPT_ERROR_IN_SCRIPT         MAKE_DMHRESULTERROR(0x0215)
138*c2c66affSColin Finck #define DMUS_E_SCRIPT_CANTLOAD_OLEAUT32       MAKE_DMHRESULTERROR(0x0216)
139*c2c66affSColin Finck #define DMUS_E_SCRIPT_LOADSCRIPT_ERROR        MAKE_DMHRESULTERROR(0x0217)
140*c2c66affSColin Finck #define DMUS_E_SCRIPT_INVALID_FILE            MAKE_DMHRESULTERROR(0x0218)
141*c2c66affSColin Finck #define DMUS_E_INVALID_SCRIPTTRACK            MAKE_DMHRESULTERROR(0x0219)
142*c2c66affSColin Finck #define DMUS_E_SCRIPT_VARIABLE_NOT_FOUND      MAKE_DMHRESULTERROR(0x021A)
143*c2c66affSColin Finck #define DMUS_E_SCRIPT_ROUTINE_NOT_FOUND       MAKE_DMHRESULTERROR(0x021B)
144*c2c66affSColin Finck #define DMUS_E_SCRIPT_CONTENT_READONLY        MAKE_DMHRESULTERROR(0x021C)
145*c2c66affSColin Finck #define DMUS_E_SCRIPT_NOT_A_REFERENCE         MAKE_DMHRESULTERROR(0x021D)
146*c2c66affSColin Finck #define DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED     MAKE_DMHRESULTERROR(0x021E)
147*c2c66affSColin Finck #define DMUS_E_INVALID_SEGMENTTRIGGERTRACK    MAKE_DMHRESULTERROR(0x0220)
148*c2c66affSColin Finck #define DMUS_E_INVALID_LYRICSTRACK            MAKE_DMHRESULTERROR(0x0221)
149*c2c66affSColin Finck #define DMUS_E_INVALID_PARAMCONTROLTRACK      MAKE_DMHRESULTERROR(0x0222)
150*c2c66affSColin Finck #define DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR      MAKE_DMHRESULTERROR(0x0223)
151*c2c66affSColin Finck #define DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR     MAKE_DMHRESULTERROR(0x0224)
152*c2c66affSColin Finck #define DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE MAKE_DMHRESULTERROR(0x0225)
153*c2c66affSColin Finck #define DMUS_E_AUDIOPATHS_NOT_VALID           MAKE_DMHRESULTERROR(0x0226)
154*c2c66affSColin Finck #define DMUS_E_AUDIOPATHS_IN_USE              MAKE_DMHRESULTERROR(0x0227)
155*c2c66affSColin Finck #define DMUS_E_NO_AUDIOPATH_CONFIG            MAKE_DMHRESULTERROR(0x0228)
156*c2c66affSColin Finck #define DMUS_E_AUDIOPATH_INACTIVE             MAKE_DMHRESULTERROR(0x0229)
157*c2c66affSColin Finck #define DMUS_E_AUDIOPATH_NOBUFFER             MAKE_DMHRESULTERROR(0x022A)
158*c2c66affSColin Finck #define DMUS_E_AUDIOPATH_NOPORT               MAKE_DMHRESULTERROR(0x022B)
159*c2c66affSColin Finck #define DMUS_E_NO_AUDIOPATH                   MAKE_DMHRESULTERROR(0x022C)
160*c2c66affSColin Finck #define DMUS_E_INVALIDCHUNK                   MAKE_DMHRESULTERROR(0x022D)
161*c2c66affSColin Finck #define DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER     MAKE_DMHRESULTERROR(0x022E)
162*c2c66affSColin Finck #define DMUS_E_INVALID_CONTAINER_OBJECT       MAKE_DMHRESULTERROR(0x022F)
163*c2c66affSColin Finck 
164*c2c66affSColin Finck #endif /* __WINE_DMUSIC_ERROR_H */
165