home *** CD-ROM | disk | FTP | other *** search
/ Microsoft DirectX SDK 6.1 / Dx6_1_Gold.iso / dxf / include / dmerror.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-11-13  |  19.1 KB  |  618 lines

  1. /************************************************************************
  2. *                                                                       *
  3. *   dmerror.h -- Error code returned by DirectMusic API's               *
  4. *                                                                       *
  5. *   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
  6. *                                                                       *
  7. ************************************************************************/
  8.  
  9. #ifndef _DMERROR_
  10. #define _DMERROR_
  11.  
  12. #define FACILITY_DIRECTMUSIC      0x878       /* Shared with DirectSound */
  13. #define DMUS_ERRBASE              0x1000      /* Make error codes human readable in hex */
  14.  
  15. #ifndef MAKE_HRESULT
  16. #define MAKE_HRESULT(sev,fac,code) \
  17.     ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
  18. #endif
  19.     
  20. #define MAKE_DMHRESULTSUCCESS(code)     MAKE_HRESULT(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
  21. #define MAKE_DMHRESULTERROR(code)       MAKE_HRESULT(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
  22.  
  23. /* DMUS_S_PARTIALLOAD
  24.  *
  25.  * The object could only load partially. This can happen if some components are
  26.  * not registered properly, such as embedded tracks and tools.
  27.  */
  28. #define DMUS_S_PARTIALLOAD              MAKE_DMHRESULTSUCCESS(0x091)
  29.  
  30. /* DMUS_S_REQUEUE
  31.  *
  32.  * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
  33.  * performance that it should cue the PMsg again automatically.
  34.  */
  35. #define DMUS_S_REQUEUE                  MAKE_DMHRESULTSUCCESS(0x200)
  36.  
  37. /* DMUS_S_FREE
  38.  *
  39.  * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
  40.  * performance that it should free the PMsg automatically.
  41.  */
  42. #define DMUS_S_FREE                     MAKE_DMHRESULTSUCCESS(0x201)
  43.  
  44. /* DMUS_S_END
  45.  *
  46.  * Return value from IDirectMusicTrack::Play() which indicates to the
  47.  * segment that the track has no more data after mtEnd.
  48.  */
  49. #define DMUS_S_END                      MAKE_DMHRESULTSUCCESS(0x202)
  50.  
  51. /* DMUS_S_STRING_TRUNCATED
  52.  *
  53.  * Returned string has been truncated to fit the buffer size.
  54.  */
  55. #define DMUS_S_STRING_TRUNCATED         MAKE_DMHRESULTSUCCESS(0x210)
  56.  
  57. /* DMUS_S_LAST_TOOL
  58.  *
  59.  * Returned from IDirectMusicGraph::StampPMsg(), this indicates that the PMsg
  60.  * is already stamped with the last tool in the graph. The returned PMsg's
  61.  * tool pointer is now NULL.
  62.  */
  63. #define DMUS_S_LAST_TOOL                MAKE_DMHRESULTSUCCESS(0x211)
  64.  
  65. /* DMUS_S_OVER_CHORD
  66.  *
  67.  * Returned from IDirectMusicPerformance::MusicToMIDI(), this indicates 
  68.  * that no note has been calculated because the music value has the note 
  69.  * at a position higher than the top note of the chord. This applies only
  70.  * to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates
  71.  * that the caller should not do anything with the note. It is not meant
  72.  * to be played against this chord.
  73.  */
  74. #define DMUS_S_OVER_CHORD               MAKE_DMHRESULTSUCCESS(0x212)
  75.  
  76. /* DMUS_S_UP_OCTAVE
  77.  *
  78.  * Returned from IDirectMusicPerformance::MIDIToMusic(),  and
  79.  * IDirectMusicPerformance::MusicToMIDI(), this indicates 
  80.  * that the note conversion generated a note value that is below 0, 
  81.  * so it has been bumped up one or more octaves to be in the proper
  82.  * MIDI range of 0 through 127. 
  83.  * Note that this is valid for MIDIToMusic() when using play modes
  84.  * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
  85.  * which store MIDI values in wMusicValue. With MusicToMIDI(), it is
  86.  * valid for all play modes.
  87.  * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
  88.  */
  89. #define DMUS_S_UP_OCTAVE                MAKE_DMHRESULTSUCCESS(0x213)
  90.  
  91. /* DMUS_S_DOWN_OCTAVE
  92.  *
  93.  * Returned from IDirectMusicPerformance::MIDIToMusic(),  and
  94.  * IDirectMusicPerformance::MusicToMIDI(), this indicates 
  95.  * that the note conversion generated a note value that is above 127, 
  96.  * so it has been bumped down one or more octaves to be in the proper
  97.  * MIDI range of 0 through 127. 
  98.  * Note that this is valid for MIDIToMusic() when using play modes
  99.  * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
  100.  * which store MIDI values in wMusicValue. With MusicToMIDI(), it is
  101.  * valid for all play modes.
  102.  * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
  103.  */
  104. #define DMUS_S_DOWN_OCTAVE              MAKE_DMHRESULTSUCCESS(0x214)
  105.  
  106. /* DMUS_E_DRIVER_FAILED
  107.  *
  108.  * An unexpected error was returned from a device driver, indicating
  109.  * possible failure of the driver or hardware.
  110.  */
  111. #define DMUS_E_DRIVER_FAILED            MAKE_DMHRESULTERROR(0x0101)
  112.  
  113. /* DMUS_E_PORTS_OPEN
  114.  *
  115.  * The requested operation cannot be performed while there are 
  116.  * instantiated ports in any process in the system.
  117.  */
  118. #define DMUS_E_PORTS_OPEN               MAKE_DMHRESULTERROR(0x0102)
  119.  
  120. /* DMUS_E_DEVICE_IN_USE
  121.  *
  122.  * The requested device is already in use (possibly by a non-DirectMusic
  123.  * client) and cannot be opened again.
  124.  */
  125. #define DMUS_E_DEVICE_IN_USE            MAKE_DMHRESULTERROR(0x0103)
  126.  
  127. /* DMUS_E_INSUFFICIENTBUFFER
  128.  *
  129.  * Buffer is not large enough for requested operation.
  130.  */
  131. #define DMUS_E_INSUFFICIENTBUFFER       MAKE_DMHRESULTERROR(0x0104)
  132.  
  133. /* DMUS_E_BUFFERNOTSET
  134.  *
  135.  * No buffer was prepared for the download data.
  136.  */
  137. #define DMUS_E_BUFFERNOTSET             MAKE_DMHRESULTERROR(0x0105)
  138.  
  139. /* DMUS_E_BUFFERNOTAVAILABLE
  140.  *
  141.  * Download failed due to inability to access or create download buffer.
  142.  */
  143. #define DMUS_E_BUFFERNOTAVAILABLE       MAKE_DMHRESULTERROR(0x0106)
  144.  
  145. /* DMUS_E_NOTADLSCOL
  146.  *
  147.  * Error parsing DLS collection. File is corrupt.
  148.  */
  149. #define DMUS_E_NOTADLSCOL               MAKE_DMHRESULTERROR(0x0108)
  150.  
  151. /* DMUS_E_INVALIDOFFSET
  152.  *
  153.  * Wave chunks in DLS collection file are at incorrect offsets.
  154.  */
  155. #define DMUS_E_INVALIDOFFSET            MAKE_DMHRESULTERROR(0x0109)
  156.  
  157. /* DMUS_E_ALREADY_LOADED
  158.  *
  159.  * Second attempt to load a DLS collection that is currently open. 
  160.  */
  161. #define DMUS_E_ALREADY_LOADED           MAKE_DMHRESULTERROR(0x0111)
  162.  
  163. /* DMUS_E_INVALIDPOS
  164.  *
  165.  * Error reading wave data from DLS collection. Indicates bad file.
  166.  */
  167. #define DMUS_E_INVALIDPOS               MAKE_DMHRESULTERROR(0x0113)
  168.  
  169. /* DMUS_E_INVALIDPATCH
  170.  *
  171.  * There is no instrument in the collection that matches patch number.
  172.  */
  173. #define DMUS_E_INVALIDPATCH             MAKE_DMHRESULTERROR(0x0114)
  174.  
  175. /* DMUS_E_CANNOTSEEK
  176.  *
  177.  * The IStream* doesn't support Seek().
  178.  */
  179. #define DMUS_E_CANNOTSEEK               MAKE_DMHRESULTERROR(0x0115)
  180.  
  181. /* DMUS_E_CANNOTWRITE
  182.  *
  183.  * The IStream* doesn't support Write().
  184.  */
  185. #define DMUS_E_CANNOTWRITE              MAKE_DMHRESULTERROR(0x0116)
  186.  
  187. /* DMUS_E_CHUNKNOTFOUND
  188.  *
  189.  * The RIFF parser doesn't contain a required chunk while parsing file.
  190.  */
  191. #define DMUS_E_CHUNKNOTFOUND            MAKE_DMHRESULTERROR(0x0117)
  192.  
  193. /* DMUS_E_INVALID_DOWNLOADID
  194.  *
  195.  * Invalid download id was used in the process of creating a download buffer.
  196.  */
  197. #define DMUS_E_INVALID_DOWNLOADID       MAKE_DMHRESULTERROR(0x0119)
  198.  
  199. /* DMUS_E_NOT_DOWNLOADED_TO_PORT
  200.  *
  201.  * Tried to unload an object that was not downloaded or previously unloaded.
  202.  */
  203. #define DMUS_E_NOT_DOWNLOADED_TO_PORT   MAKE_DMHRESULTERROR(0x0120)
  204.  
  205. /* DMUS_E_ALREADY_DOWNLOADED
  206.  *
  207.  * Buffer was already downloaded to synth.
  208.  */
  209. #define DMUS_E_ALREADY_DOWNLOADED       MAKE_DMHRESULTERROR(0x0121)
  210.  
  211. /* DMUS_E_UNKNOWN_PROPERTY
  212.  *
  213.  * The specified property item was not recognized by the target object.
  214.  */
  215. #define DMUS_E_UNKNOWN_PROPERTY         MAKE_DMHRESULTERROR(0x0122)
  216.  
  217. /* DMUS_E_SET_UNSUPPORTED
  218.  *
  219.  * The specified property item may not be set on the target object.
  220.  */
  221. #define DMUS_E_SET_UNSUPPORTED          MAKE_DMHRESULTERROR(0x0123)
  222.  
  223. /* DMUS_E_GET_UNSUPPORTED
  224.  *
  225.  * The specified property item may not be retrieved from the target object.
  226.  */ 
  227. #define DMUS_E_GET_UNSUPPORTED          MAKE_DMHRESULTERROR(0x0124)
  228.  
  229. /* DMUS_E_NOTMONO
  230.  *
  231.  * Wave chunk has more than one interleaved channel. DLS format requires MONO.
  232.  */
  233. #define DMUS_E_NOTMONO                  MAKE_DMHRESULTERROR(0x0125)
  234.  
  235. /* DMUS_E_BADARTICULATION
  236.  *
  237.  * Invalid articulation chunk in DLS collection.
  238.  */
  239. #define DMUS_E_BADARTICULATION          MAKE_DMHRESULTERROR(0x0126)
  240.  
  241. /* DMUS_E_BADINSTRUMENT
  242.  *
  243.  * Invalid instrument chunk in DLS collection.
  244.  */
  245. #define DMUS_E_BADINSTRUMENT            MAKE_DMHRESULTERROR(0x0127)
  246.  
  247. /* DMUS_E_BADWAVELINK
  248.  *
  249.  * Wavelink chunk in DLS collection points to invalid wave.
  250.  */
  251. #define DMUS_E_BADWAVELINK              MAKE_DMHRESULTERROR(0x0128)
  252.  
  253. /* DMUS_E_NOARTICULATION
  254.  *
  255.  * Articulation missing from instrument in DLS collection.
  256.  */
  257. #define DMUS_E_NOARTICULATION           MAKE_DMHRESULTERROR(0x0129)
  258.  
  259. /* DMUS_E_NOTPCM
  260.  *
  261.  * Downoaded DLS wave is not in PCM format. 
  262. */
  263. #define DMUS_E_NOTPCM                   MAKE_DMHRESULTERROR(0x012A)
  264.  
  265. /* DMUS_E_BADWAVE
  266.  *
  267.  * Bad wave chunk in DLS collection
  268.  */
  269. #define DMUS_E_BADWAVE                  MAKE_DMHRESULTERROR(0x012B)
  270.  
  271. /* DMUS_E_BADOFFSETTABLE
  272.  *
  273.  * Offset Table for download buffer has errors. 
  274.  */
  275. #define DMUS_E_BADOFFSETTABLE           MAKE_DMHRESULTERROR(0x012C)
  276.  
  277. /* DMUS_E_UNKNOWNDOWNLOAD
  278.  *
  279.  * Attempted to download unknown data type.
  280.  */
  281. #define DMUS_E_UNKNOWNDOWNLOAD          MAKE_DMHRESULTERROR(0x012D)
  282.  
  283. /* DMUS_E_NOSYNTHSINK
  284.  *
  285.  * The operation could not be completed because no sink was connected to
  286.  * the synthesizer.
  287.  */
  288. #define DMUS_E_NOSYNTHSINK              MAKE_DMHRESULTERROR(0x012E)
  289.  
  290. /* DMUS_E_ALREADYOPEN
  291.  *
  292.  * An attempt was made to open the software synthesizer while it was already 
  293.  * open.
  294.  * ASSERT?
  295.  */
  296. #define DMUS_E_ALREADYOPEN              MAKE_DMHRESULTERROR(0x012F)
  297.  
  298. /* DMUS_E_ALREADYCLOSE
  299.  *
  300.  * An attempt was made to close the software synthesizer while it was already 
  301.  * open.
  302.  * ASSERT?
  303.  */
  304. #define DMUS_E_ALREADYCLOSED            MAKE_DMHRESULTERROR(0x0130)
  305.  
  306. /* DMUS_E_SYNTHNOTCONFIGURED
  307.  *
  308.  * The operation could not be completed because the software synth has not 
  309.  * yet been fully configured.
  310.  * ASSERT?
  311.  */
  312. #define DMUS_E_SYNTHNOTCONFIGURED       MAKE_DMHRESULTERROR(0x0131)
  313.  
  314. /* DMUS_E_SYNTHACTIVE
  315.  *
  316.  * The operation cannot be carried out while the synthesizer is active.
  317.  */
  318. #define DMUS_E_SYNTHACTIVE              MAKE_DMHRESULTERROR(0x0132)
  319.  
  320. /* DMUS_E_CANNOTREAD
  321.  *
  322.  * An error occurred while attempting to read from the IStream* object.
  323.  */
  324. #define DMUS_E_CANNOTREAD               MAKE_DMHRESULTERROR(0x0133)
  325.  
  326. /* DMUS_E_DMUSIC_RELEASED
  327.  *
  328.  * The operation cannot be performed because the final instance of the
  329.  * DirectMusic object was released. Ports cannot be used after final 
  330.  * release of the DirectMusic object.
  331.  */
  332. #define DMUS_E_DMUSIC_RELEASED          MAKE_DMHRESULTERROR(0x0134)
  333.  
  334. /* DMUS_E_BUFFER_EMPTY
  335.  *
  336.  * There was no data in the referenced buffer.
  337.  */
  338. #define DMUS_E_BUFFER_EMPTY             MAKE_DMHRESULTERROR(0x0135)
  339.  
  340. /* DMUS_E_BUFFER_FULL
  341.  *
  342.  * There is insufficient space to insert the given event into the buffer.
  343.  */
  344. #define DMUS_E_BUFFER_FULL              MAKE_DMHRESULTERROR(0x0136)
  345.  
  346. /* DMUS_E_PORT_NOT_CAPTURE
  347.  *
  348.  * The given operation could not be carried out because the port is a
  349.  * capture port.
  350.  */
  351. #define DMUS_E_PORT_NOT_CAPTURE         MAKE_DMHRESULTERROR(0x0137)
  352.  
  353. /* DMUS_E_PORT_NOT_RENDER
  354.  *
  355.  * The given operation could not be carried out because the port is a
  356.  * render port.
  357.  */
  358. #define DMUS_E_PORT_NOT_RENDER          MAKE_DMHRESULTERROR(0x0138)
  359.  
  360. /* DMUS_E_DSOUND_NOT_SET
  361.  *
  362.  * The port could not be created because no DirectSound has been specified.
  363.  * Specify a DirectSound interface via the IDirectMusic::SetDirectSound
  364.  * method; pass NULL to have DirectMusic manage usage of DirectSound.
  365.  */
  366. #define DMUS_E_DSOUND_NOT_SET           MAKE_DMHRESULTERROR(0x0139)
  367.  
  368. /* DMUS_E_ALREADY_ACTIVATED
  369.  *
  370.  * The operation cannot be carried out while the port is active.
  371.  */
  372. #define DMUS_E_ALREADY_ACTIVATED        MAKE_DMHRESULTERROR(0x013A)
  373.  
  374. /* DMUS_E_INVALIDBUFFER
  375.  *
  376.  * Invalid DirectSound buffer was handed to port. 
  377.  */
  378. #define DMUS_E_INVALIDBUFFER            MAKE_DMHRESULTERROR(0x013B)
  379.  
  380. /* DMUS_E_WAVEFORMATNOTSUPPORTED
  381.  *
  382.  * Invalid buffer format was handed to the synth sink.
  383.  */
  384. #define DMUS_E_WAVEFORMATNOTSUPPORTED   MAKE_DMHRESULTERROR(0x013C)
  385.  
  386. /* DMUS_E_SYNTHINACTIVE
  387.  *
  388.  * The operation cannot be carried out while the synthesizer is inactive.
  389.  */
  390. #define DMUS_E_SYNTHINACTIVE            MAKE_DMHRESULTERROR(0x013D)
  391.  
  392. /* DMUS_E_DSOUND_ALREADY_SET
  393.  *
  394.  * IDirectMusic::SetDirectSound has already been called. It may not be
  395.  * changed while in use.
  396.  */
  397. #define DMUS_E_DSOUND_ALREADY_SET       MAKE_DMHRESULTERROR(0x013E)
  398.  
  399. /* DMUS_E_INVALID_EVENT
  400.  *
  401.  * The given event is invalid (either it is not a valid MIDI message
  402.  * or it makes use of running status). The event cannot be packed
  403.  * into the buffer.
  404.  */
  405. #define DMUS_E_INVALID_EVENT            MAKE_DMHRESULTERROR(0x013F)
  406.  
  407. /* DMUS_E_UNSUPPORTED_STREAM
  408.  *
  409.  * The IStream* object does not contain data supported by the loading object.
  410.  */
  411. #define DMUS_E_UNSUPPORTED_STREAM       MAKE_DMHRESULTERROR(0x0150)
  412.  
  413. /* DMUS_E_ALREADY_INITED
  414.  *
  415.  * The object has already been initialized.
  416.  */
  417. #define DMUS_E_ALREADY_INITED           MAKE_DMHRESULTERROR(0x0151)
  418.  
  419. /* DMUS_E_INVALID_BAND
  420.  *
  421.  * The file does not contain a valid band.
  422.  */
  423. #define DMUS_E_INVALID_BAND             MAKE_DMHRESULTERROR(0x0152)
  424.  
  425. /* DMUS_E_TRACK_HDR_NOT_FIRST_CK
  426.  *
  427.  * The IStream* object's data does not have a track header as the first chunk,
  428.  * and therefore can not be read by the segment object.
  429.  */
  430. #define DMUS_E_TRACK_HDR_NOT_FIRST_CK   MAKE_DMHRESULTERROR(0x0155)
  431.  
  432. /* DMUS_E_TOOL_HDR_NOT_FIRST_CK
  433.  *
  434.  * The IStream* object's data does not have a tool header as the first chunk,
  435.  * and therefore can not be read by the graph object.
  436.  */
  437. #define DMUS_E_TOOL_HDR_NOT_FIRST_CK    MAKE_DMHRESULTERROR(0x0156)
  438.  
  439. /* DMUS_E_INVALID_TRACK_HDR
  440.  *
  441.  * The IStream* object's data contains an invalid track header (ckid is 0 and
  442.  * fccType is NULL,) and therefore can not be read by the segment object.
  443.  */
  444. #define DMUS_E_INVALID_TRACK_HDR        MAKE_DMHRESULTERROR(0x0157)
  445.  
  446. /* DMUS_E_INVALID_TOOL_HDR
  447.  *
  448.  * The IStream* object's data contains an invalid tool header (ckid is 0 and
  449.  * fccType is NULL,) and therefore can not be read by the graph object.
  450.  */
  451. #define DMUS_E_INVALID_TOOL_HDR         MAKE_DMHRESULTERROR(0x0158)
  452.  
  453. /* DMUS_E_ALL_TOOLS_FAILED
  454.  *
  455.  * The graph object was unable to load all tools from the IStream* object data.
  456.  * This may be due to errors in the stream, or the tools being incorrectly
  457.  * registered on the client.
  458.  */
  459. #define DMUS_E_ALL_TOOLS_FAILED         MAKE_DMHRESULTERROR(0x0159)
  460.  
  461. /* DMUS_E_ALL_TRACKS_FAILED
  462.  *
  463.  * The segment object was unable to load all tracks from the IStream* object data.
  464.  * This may be due to errors in the stream, or the tracks being incorrectly
  465.  * registered on the client.
  466.  */
  467. #define DMUS_E_ALL_TRACKS_FAILED        MAKE_DMHRESULTERROR(0x0160)
  468.  
  469. /* DMUS_E_NOT_FOUND
  470.  *
  471.  * The requested item was not contained by the object.
  472.  */
  473. #define DMUS_E_NOT_FOUND                MAKE_DMHRESULTERROR(0x0161)
  474.  
  475. /* DMUS_E_NOT_INIT
  476.  *
  477.  * A required object is not initialized or failed to initialize.
  478.  */
  479. #define DMUS_E_NOT_INIT                 MAKE_DMHRESULTERROR(0x0162)
  480.  
  481. /* DMUS_E_TYPE_DISABLED
  482.  *
  483.  * The requested parameter type is currently disabled. Parameter types may
  484.  * be enabled and disabled by certain calls to SetParam().
  485.  */
  486. #define DMUS_E_TYPE_DISABLED            MAKE_DMHRESULTERROR(0x0163)
  487.  
  488. /* DMUS_E_TYPE_UNSUPPORTED
  489.  *
  490.  * The requested parameter type is not supported on the object.
  491.  */
  492. #define DMUS_E_TYPE_UNSUPPORTED         MAKE_DMHRESULTERROR(0x0164)
  493.  
  494. /* DMUS_E_TIME_PAST
  495.  *
  496.  * The time is in the past, and the operation can not succeed.
  497.  */
  498. #define DMUS_E_TIME_PAST                MAKE_DMHRESULTERROR(0x0165)
  499.  
  500. /* DMUS_E_TRACK_NOT_FOUND
  501.  *
  502.  * The requested track is not contained by the segment.
  503.  */
  504. #define DMUS_E_TRACK_NOT_FOUND            MAKE_DMHRESULTERROR(0x0166)
  505.  
  506. /* DMUS_E_NO_MASTER_CLOCK
  507.  *
  508.  * There is no master clock in the performance. Be sure to call
  509.  * IDirectMusicPerformance::Init().
  510.  */
  511. #define DMUS_E_NO_MASTER_CLOCK          MAKE_DMHRESULTERROR(0x0170)
  512.  
  513. /* DMUS_E_LOADER_NOCLASSID
  514.  *
  515.  * The class id field is required and missing in the DMUS_OBJECTDESC.
  516.  */
  517. #define DMUS_E_LOADER_NOCLASSID         MAKE_DMHRESULTERROR(0x0180)
  518.  
  519. /* DMUS_E_LOADER_BADPATH
  520.  *
  521.  * The requested file path is invalid.
  522.  */
  523. #define DMUS_E_LOADER_BADPATH           MAKE_DMHRESULTERROR(0x0181)
  524.  
  525. /* DMUS_E_LOADER_FAILEDOPEN
  526.  *
  527.  * File open failed - either file doesn't exist or is locked.
  528.  */
  529. #define DMUS_E_LOADER_FAILEDOPEN        MAKE_DMHRESULTERROR(0x0182)
  530.  
  531. /* DMUS_E_LOADER_FORMATNOTSUPPORTED
  532.  *
  533.  * Search data type is not supported.
  534.  */
  535. #define DMUS_E_LOADER_FORMATNOTSUPPORTED    MAKE_DMHRESULTERROR(0x0183)
  536.  
  537. /* DMUS_E_LOADER_FAILEDCREATE
  538.  *
  539.  * Unable to find or create object.
  540.  */
  541. #define DMUS_E_LOADER_FAILEDCREATE      MAKE_DMHRESULTERROR(0x0184)
  542.  
  543. /* DMUS_E_LOADER_OBJECTNOTFOUND
  544.  *
  545.  * Object was not found.
  546.  */
  547. #define DMUS_E_LOADER_OBJECTNOTFOUND    MAKE_DMHRESULTERROR(0x0185)
  548.  
  549. /* DMUS_E_LOADER_NOFILENAME
  550.  *
  551.  * The file name is missing from the DMUS_OBJECTDESC.
  552.  */
  553. #define DMUS_E_LOADER_NOFILENAME        MAKE_DMHRESULTERROR(0x0186)
  554.  
  555. /* DMUS_E_INVALIDFILE
  556.  *
  557.  * The file requested is not a valid file.
  558.  */
  559. #define DMUS_E_INVALIDFILE              MAKE_DMHRESULTERROR(0x0200)
  560.  
  561. /* DMUS_E_ALREADY_EXISTS
  562.  *
  563.  * The tool is already contained in the graph. Create a new instance.
  564.  */
  565. #define DMUS_E_ALREADY_EXISTS           MAKE_DMHRESULTERROR(0x0201)
  566.  
  567. /* DMUS_E_OUT_OF_RANGE
  568.  *
  569.  * Value is out of range, for instance the requested length is longer than
  570.  * the segment.
  571.  */
  572. #define DMUS_E_OUT_OF_RANGE             MAKE_DMHRESULTERROR(0x0202)
  573.  
  574. /* DMUS_E_SEGMENT_INIT_FAILED
  575.  *
  576.  * Segment initialization failed, most likely due to a critical memory situation.
  577.  */
  578. #define DMUS_E_SEGMENT_INIT_FAILED      MAKE_DMHRESULTERROR(0x0203)
  579.  
  580. /* DMUS_E_ALREADY_SENT
  581.  *
  582.  * The DMUS_PMSG has already been sent to the performance object via
  583.  * IDirectMusicPerformance::SendPMsg().
  584.  */
  585. #define DMUS_E_ALREADY_SENT             MAKE_DMHRESULTERROR(0x0204)
  586.  
  587. /* DMUS_E_CANNOT_FREE
  588.  *
  589.  * The DMUS_PMSG was either not allocated by the performance via
  590.  * IDirectMusicPerformance::AllocPMsg(), or it was already freed via
  591.  * IDirectMusicPerformance::FreePMsg().
  592.  */
  593. #define DMUS_E_CANNOT_FREE              MAKE_DMHRESULTERROR(0x0205)
  594.  
  595. /* DMUS_E_CANNOT_OPEN_PORT
  596.  *
  597.  * The default system port could not be opened.
  598.  */
  599. #define DMUS_E_CANNOT_OPEN_PORT         MAKE_DMHRESULTERROR(0x0206)
  600.  
  601. /* DMUS_E_CONNOT_CONVERT
  602.  *
  603.  * A call to MIDIToMusic() or MusicToMIDI() resulted in an error because
  604.  * the requested conversion could not happen. This usually occurs when the
  605.  * provided DMUS_CHORD_KEY structure has an invalid chord or scale pattern.
  606.  */
  607. #define DMUS_E_CONNOT_CONVERT           MAKE_DMHRESULTERROR(0x0207)
  608.  
  609. /* DMUS_E_DESCEND_CHUNK_FAIL
  610.  * 
  611.  * DMUS_E_DESCEND_CHUNK_FAIL is returned when the end of the file 
  612.  * was reached before the desired chunk was found.
  613.  */
  614. #define DMUS_E_DESCEND_CHUNK_FAIL       MAKE_DMHRESULTERROR(0x0210)
  615.  
  616. #endif
  617.  
  618.