/*==========================================================================; * * * File: dxerr8.cpp * Content: DirectX Error Library * ****************************************************************************/ #include #include #include #include"d3d8.h" #include"d3dx8.h" #include"d3dxerr.h" #include"dsound.h" #include"dmusici.h" #include"dplay8.h" #include"dvoice.h" #include"dinput.h" #include"dinputd.h" //#include"appman.h" #define BUFFER_SIZE 3000 #define CHK_ERR(hrchk, strOut) \ case hrchk: \ return strOut; /****************************************************/ /* DXGetErrorString8A */ /* */ /****************************************************/ const char * __stdcall DXGetErrorString8A(HRESULT hr) { switch(hr) { // Common Win32 error codes CHK_ERR(S_OK, "S_OK") CHK_ERR(S_FALSE, "S_FALSE") CHK_ERR(E_UNEXPECTED, "E_UNEXPECTED") CHK_ERR(E_NOTIMPL, "E_NOTIMPL") CHK_ERR(E_OUTOFMEMORY, "E_OUTOFMEMORY") CHK_ERR(E_INVALIDARG, "E_INVALIDARG") CHK_ERR(E_NOINTERFACE, "E_NOINTERFACE") CHK_ERR(E_POINTER, "E_POINTER") CHK_ERR(E_HANDLE, "E_HANDLE") CHK_ERR(E_ABORT, "E_ABORT") CHK_ERR(E_FAIL, "E_FAIL") CHK_ERR(E_ACCESSDENIED, "E_ACCESSDENIED") CHK_ERR(E_PENDING, "E_PENDING") CHK_ERR(REGDB_E_CLASSNOTREG, "REGDB_E_CLASSNOTREG") CHK_ERR(CO_E_NOTINITIALIZED, "CO_E_NOTINITIALIZED") CHK_ERR(CO_E_ALREADYINITIALIZED, "CO_E_ALREADYINITIALIZED") // CHK_ERR(DIERR_GENERIC, "E_FAIL") CHK_ERR(DIERR_NOAGGREGATION, "E_NOAGGREGATION") CHK_ERR(DIERR_INSUFFICIENTPRIVS, "DIERR_INSUFFICIENTPRIVS") CHK_ERR(DIERR_DEVICEFULL, "DIERR_DEVICEFULL") CHK_ERR(DIERR_MOREDATA, "DIERR_MOREDATA") CHK_ERR(DIERR_NOTDOWNLOADED, "DIERR_NOTDOWNLOADED") CHK_ERR(DIERR_HASEFFECTS, "DIERR_HASEFFECTS") CHK_ERR(DIERR_NOTEXCLUSIVEACQUIRED, "DIERR_NOTEXCLUSIVEACQUIRED") CHK_ERR(DIERR_INCOMPLETEEFFECT, "DIERR_INCOMPLETEEFFECT") CHK_ERR(DIERR_NOTBUFFERED, "DIERR_NOTBUFFERED") CHK_ERR(DIERR_EFFECTPLAYING, "DIERR_EFFECTPLAYING") CHK_ERR(DIERR_UNPLUGGED, "DIERR_UNPLUGGED") CHK_ERR(DIERR_REPORTFULL, "DIERR_REPORTFULL") CHK_ERR(DIERR_DRIVERFIRST, "DIERR_DRIVERFIRST") CHK_ERR(DIERR_DRIVERLAST, "DIERR_DRIVERLAST") CHK_ERR(DIERR_INVALIDCLASSINSTALLER, "DIERR_INVALIDCLASSINSTALLER") CHK_ERR(DIERR_CANCELLED, "DIERR_CANCELLED") CHK_ERR(DIERR_BADINF, "DIERR_BADINF") CHK_ERR(DIERR_NOTFOUND, "DIERR_NOTFOUND or DIERR_NOTFOUND") // CHK_ERR(DIERR_READONLY, "DIERR_READONLY or DIERR_OTHERAPPHASPRIO or DIERR_HANDLEEXISTS or DSERR_ACCESSDENIED") CHK_ERR(DIERR_NOTACQUIRED, "DIERR_NOTACQUIRED") // CHK_ERR(DIERR_OUTOFMEMORY, "E_OUTOFMEMORY") CHK_ERR(DIERR_NOTINITIALIZED, "DIERR_NOTINITIALIZED") CHK_ERR(DIERR_INPUTLOST, "DIERR_INPUTLOST") CHK_ERR(DIERR_BADDRIVERVER, "DIERR_BADDRIVERVER") CHK_ERR(DIERR_ACQUIRED, "DIERR_ACQUIRED") CHK_ERR(DIERR_NOMOREITEMS, "DIERR_NOMOREITEMS") CHK_ERR(DIERR_OLDDIRECTINPUTVERSION, "DIERR_OLDDIRECTINPUTVERSION") CHK_ERR(DIERR_BETADIRECTINPUTVERSION, "DIERR_BETADIRECTINPUTVERSION") CHK_ERR(DIERR_ALREADYINITIALIZED, "DIERR_ALREADYINITIALIZED") CHK_ERR(DVERR_BUFFERTOOSMALL, "DVERR_BUFFERTOOSMALL") CHK_ERR(DVERR_EXCEPTION, "DVERR_EXCEPTION") CHK_ERR(DVERR_INVALIDFLAGS, "DVERR_INVALIDFLAGS") CHK_ERR(DVERR_INVALIDOBJECT, "DVERR_INVALIDOBJECT") CHK_ERR(DVERR_INVALIDPLAYER, "DVERR_INVALIDPLAYER") CHK_ERR(DVERR_INVALIDGROUP, "DVERR_INVALIDGROUP") CHK_ERR(DVERR_INVALIDHANDLE, "DVERR_INVALIDHANDLE") CHK_ERR(DVERR_SESSIONLOST, "DVERR_SESSIONLOST") CHK_ERR(DVERR_NOVOICESESSION, "DVERR_NOVOICESESSION") CHK_ERR(DVERR_CONNECTIONLOST, "DVERR_CONNECTIONLOST") CHK_ERR(DVERR_NOTINITIALIZED, "DVERR_NOTINITIALIZED") CHK_ERR(DVERR_CONNECTED, "DVERR_CONNECTED") CHK_ERR(DVERR_NOTCONNECTED, "DVERR_NOTCONNECTED") CHK_ERR(DVERR_CONNECTABORTING, "DVERR_CONNECTABORTING") CHK_ERR(DVERR_NOTALLOWED, "DVERR_NOTALLOWED") CHK_ERR(DVERR_INVALIDTARGET, "DVERR_INVALIDTARGET") CHK_ERR(DVERR_TRANSPORTNOTHOST, "DVERR_TRANSPORTNOTHOST") CHK_ERR(DVERR_COMPRESSIONNOTSUPPORTED, "DVERR_COMPRESSIONNOTSUPPORTED") CHK_ERR(DVERR_ALREADYPENDING, "DVERR_ALREADYPENDING") CHK_ERR(DVERR_SOUNDINITFAILURE, "DVERR_SOUNDINITFAILURE") CHK_ERR(DVERR_TIMEOUT, "DVERR_TIMEOUT") CHK_ERR(DVERR_CONNECTABORTED, "DVERR_CONNECTABORTED") CHK_ERR(DVERR_NO3DSOUND, "DVERR_NO3DSOUND") CHK_ERR(DVERR_ALREADYBUFFERED, "DVERR_ALREADYBUFFERED") CHK_ERR(DVERR_NOTBUFFERED, "DVERR_NOTBUFFERED") CHK_ERR(DVERR_HOSTING, "DVERR_HOSTING") CHK_ERR(DVERR_NOTHOSTING, "DVERR_NOTHOSTING") CHK_ERR(DVERR_INVALIDDEVICE, "DVERR_INVALIDDEVICE") CHK_ERR(DVERR_RECORDSYSTEMERROR, "DVERR_RECORDSYSTEMERROR") CHK_ERR(DVERR_PLAYBACKSYSTEMERROR, "DVERR_PLAYBACKSYSTEMERROR") CHK_ERR(DVERR_SENDERROR, "DVERR_SENDERROR") CHK_ERR(DVERR_USERCANCEL, "DVERR_USERCANCEL") CHK_ERR(DVERR_RUNSETUP, "DVERR_RUNSETUP") CHK_ERR(DVERR_INCOMPATIBLEVERSION, "DVERR_INCOMPATIBLEVERSION") CHK_ERR(DVERR_INITIALIZED, "DVERR_INITIALIZED") CHK_ERR(DVERR_NOTRANSPORT, "DVERR_NOTRANSPORT") CHK_ERR(DVERR_NOCALLBACK, "DVERR_NOCALLBACK") CHK_ERR(DVERR_TRANSPORTNOTINIT, "DVERR_TRANSPORTNOTINIT") CHK_ERR(DVERR_TRANSPORTNOSESSION, "DVERR_TRANSPORTNOSESSION") CHK_ERR(DVERR_TRANSPORTNOPLAYER, "DVERR_TRANSPORTNOPLAYER") CHK_ERR(DVERR_USERBACK, "DVERR_USERBACK") CHK_ERR(DVERR_NORECVOLAVAILABLE, "DVERR_NORECVOLAVAILABLE") CHK_ERR(DPNERR_ABORTED, "DPNERR_ABORTED") CHK_ERR(DPNERR_ADDRESSING, "DPNERR_ADDRESSING") CHK_ERR(DPNERR_ALREADYCONNECTED, "DPNERR_ALREADYCONNECTED") CHK_ERR(DPNERR_ALREADYDISCONNECTING, "DPNERR_ALREADYDISCONNECTING") CHK_ERR(DPNERR_ALREADYINITIALIZED, "DPNERR_ALREADYINITIALIZED") CHK_ERR(DPNERR_ALREADYREGISTERED, "DPNERR_ALREADYREGISTERED") CHK_ERR(DPNERR_BUFFERTOOSMALL, "DPNERR_BUFFERTOOSMALL") CHK_ERR(DPNERR_CANNOTCANCEL, "DPNERR_CANNOTCANCEL") CHK_ERR(DPNERR_CANTCREATEGROUP, "DPNERR_CANTCREATEGROUP") CHK_ERR(DPNERR_CANTCREATEPLAYER, "DPNERR_CANTCREATEPLAYER") CHK_ERR(DPNERR_CANTLAUNCHAPPLICATION, "DPNERR_CANTLAUNCHAPPLICATION") CHK_ERR(DPNERR_CONNECTING, "DPNERR_CONNECTING") CHK_ERR(DPNERR_CONNECTIONLOST, "DPNERR_CONNECTIONLOST") CHK_ERR(DPNERR_CONVERSION, "DPNERR_CONVERSION") CHK_ERR(DPNERR_DOESNOTEXIST, "DPNERR_DOESNOTEXIST") CHK_ERR(DPNERR_DUPLICATECOMMAND, "DPNERR_DUPLICATECOMMAND") CHK_ERR(DPNERR_ENDPOINTNOTRECEIVING, "DPNERR_ENDPOINTNOTRECEIVING") CHK_ERR(DPNERR_EXCEPTION, "DPNERR_EXCEPTION") CHK_ERR(DPNERR_GROUPNOTEMPTY, "DPNERR_GROUPNOTEMPTY") CHK_ERR(DPNERR_HOSTING, "DPNERR_HOSTING") CHK_ERR(DPNERR_HOSTREJECTEDCONNECTION, "DPNERR_HOSTREJECTEDCONNECTION") CHK_ERR(DPNERR_INCOMPLETEADDRESS, "DPNERR_INCOMPLETEADDRESS") CHK_ERR(DPNERR_INVALIDADDRESSFORMAT, "DPNERR_INVALIDADDRESSFORMAT") CHK_ERR(DPNERR_INVALIDAPPLICATION, "DPNERR_INVALIDAPPLICATION") CHK_ERR(DPNERR_INVALIDCOMMAND, "DPNERR_INVALIDCOMMAND") CHK_ERR(DPNERR_INVALIDENDPOINT, "DPNERR_INVALIDENDPOINT") CHK_ERR(DPNERR_INVALIDFLAGS, "DPNERR_INVALIDFLAGS") CHK_ERR(DPNERR_INVALIDGROUP, "DPNERR_INVALIDGROUP") CHK_ERR(DPNERR_INVALIDHANDLE, "DPNERR_INVALIDHANDLE") CHK_ERR(DPNERR_INVALIDINSTANCE, "DPNERR_INVALIDINSTANCE") CHK_ERR(DPNERR_INVALIDINTERFACE, "DPNERR_INVALIDINTERFACE") CHK_ERR(DPNERR_INVALIDDEVICEADDRESS, "DPNERR_INVALIDDEVICEADDRESS") CHK_ERR(DPNERR_INVALIDOBJECT, "DPNERR_INVALIDOBJECT") CHK_ERR(DPNERR_INVALIDPASSWORD, "DPNERR_INVALIDPASSWORD") CHK_ERR(DPNERR_INVALIDPLAYER, "DPNERR_INVALIDPLAYER") CHK_ERR(DPNERR_INVALIDPRIORITY, "DPNERR_INVALIDPRIORITY") CHK_ERR(DPNERR_INVALIDHOSTADDRESS, "DPNERR_INVALIDHOSTADDRESS") CHK_ERR(DPNERR_INVALIDSTRING, "DPNERR_INVALIDSTRING") CHK_ERR(DPNERR_INVALIDURL, "DPNERR_INVALIDURL") CHK_ERR(DPNERR_NOCAPS, "DPNERR_NOCAPS") CHK_ERR(DPNERR_NOCONNECTION, "DPNERR_NOCONNECTION") CHK_ERR(DPNERR_NOHOSTPLAYER, "DPNERR_NOHOSTPLAYER") CHK_ERR(DPNERR_NOMOREADDRESSCOMPONENTS, "DPNERR_NOMOREADDRESSCOMPONENTS") CHK_ERR(DPNERR_NORESPONSE, "DPNERR_NORESPONSE") CHK_ERR(DPNERR_NOTALLOWED, "DPNERR_NOTALLOWED") CHK_ERR(DPNERR_NOTHOST, "DPNERR_NOTHOST") CHK_ERR(DPNERR_NOTREADY, "DPNERR_NOTREADY") CHK_ERR(DPNERR_NOTREGISTERED, "DPNERR_NOTREGISTERED") CHK_ERR(DPNERR_PLAYERLOST, "DPNERR_PLAYERLOST") CHK_ERR(DPNERR_SENDTOOLARGE, "DPNERR_SENDTOOLARGE") CHK_ERR(DPNERR_SESSIONFULL, "DPNERR_SESSIONFULL") CHK_ERR(DPNERR_TABLEFULL, "DPNERR_TABLEFULL") CHK_ERR(DPNERR_TIMEDOUT, "DPNERR_TIMEDOUT") CHK_ERR(DPNERR_UNINITIALIZED, "DPNERR_UNINITIALIZED") CHK_ERR(DPNERR_USERCANCEL, "DPNERR_USERCANCEL") CHK_ERR(DXFILEERR_BADOBJECT, "DXFILEERR_BADOBJECT") CHK_ERR(DXFILEERR_BADVALUE, "DXFILEERR_BADVALUE") CHK_ERR(DXFILEERR_BADTYPE, "DXFILEERR_BADTYPE") CHK_ERR(DXFILEERR_BADSTREAMHANDLE, "DXFILEERR_BADSTREAMHANDLE") CHK_ERR(DXFILEERR_BADALLOC, "DXFILEERR_BADALLOC") CHK_ERR(DXFILEERR_NOTFOUND, "DXFILEERR_NOTFOUND") CHK_ERR(DXFILEERR_NOTDONEYET, "DXFILEERR_NOTDONEYET") CHK_ERR(DXFILEERR_FILENOTFOUND, "DXFILEERR_FILENOTFOUND") CHK_ERR(DXFILEERR_RESOURCENOTFOUND, "DXFILEERR_RESOURCENOTFOUND") CHK_ERR(DXFILEERR_URLNOTFOUND, "DXFILEERR_URLNOTFOUND") CHK_ERR(DXFILEERR_BADRESOURCE, "DXFILEERR_BADRESOURCE") CHK_ERR(DXFILEERR_BADFILETYPE, "DXFILEERR_BADFILETYPE") CHK_ERR(DXFILEERR_BADFILEVERSION, "DXFILEERR_BADFILEVERSION") CHK_ERR(DXFILEERR_BADFILEFLOATSIZE, "DXFILEERR_BADFILEFLOATSIZE") CHK_ERR(DXFILEERR_BADFILECOMPRESSIONTYPE, "DXFILEERR_BADFILECOMPRESSIONTYPE") CHK_ERR(DXFILEERR_BADFILE, "DXFILEERR_BADFILE") CHK_ERR(DXFILEERR_PARSEERROR, "DXFILEERR_PARSEERROR") CHK_ERR(DXFILEERR_NOTEMPLATE, "DXFILEERR_NOTEMPLATE") CHK_ERR(DXFILEERR_BADARRAYSIZE, "DXFILEERR_BADARRAYSIZE") CHK_ERR(DXFILEERR_BADDATAREFERENCE, "DXFILEERR_BADDATAREFERENCE") CHK_ERR(DXFILEERR_INTERNALERROR, "DXFILEERR_INTERNALERROR") CHK_ERR(DXFILEERR_NOMOREOBJECTS, "DXFILEERR_NOMOREOBJECTS") CHK_ERR(DXFILEERR_BADINTRINSICS, "DXFILEERR_BADINTRINSICS") CHK_ERR(DXFILEERR_NOMORESTREAMHANDLES, "DXFILEERR_NOMORESTREAMHANDLES") CHK_ERR(DXFILEERR_NOMOREDATA, "DXFILEERR_NOMOREDATA") CHK_ERR(DXFILEERR_BADCACHEFILE, "DXFILEERR_BADCACHEFILE") CHK_ERR(DXFILEERR_NOINTERNET, "DXFILEERR_NOINTERNET") CHK_ERR(D3DERR_OUTOFVIDEOMEMORY, "D3DERR_OUTOFVIDEOMEMORY") CHK_ERR(D3DERR_WRONGTEXTUREFORMAT, "D3DERR_WRONGTEXTUREFORMAT") CHK_ERR(D3DERR_UNSUPPORTEDCOLOROPERATION, "D3DERR_UNSUPPORTEDCOLOROPERATION") CHK_ERR(D3DERR_UNSUPPORTEDCOLORARG, "D3DERR_UNSUPPORTEDCOLORARG") CHK_ERR(D3DERR_UNSUPPORTEDALPHAOPERATION, "D3DERR_UNSUPPORTEDALPHAOPERATION") CHK_ERR(D3DERR_UNSUPPORTEDALPHAARG, "D3DERR_UNSUPPORTEDALPHAARG") CHK_ERR(D3DERR_TOOMANYOPERATIONS, "D3DERR_TOOMANYOPERATIONS") CHK_ERR(D3DERR_CONFLICTINGTEXTUREFILTER, "D3DERR_CONFLICTINGTEXTUREFILTER") CHK_ERR(D3DERR_UNSUPPORTEDFACTORVALUE, "D3DERR_UNSUPPORTEDFACTORVALUE") CHK_ERR(D3DERR_CONFLICTINGRENDERSTATE, "D3DERR_CONFLICTINGRENDERSTATE") CHK_ERR(D3DERR_UNSUPPORTEDTEXTUREFILTER, "D3DERR_UNSUPPORTEDTEXTUREFILTER") CHK_ERR(D3DERR_CONFLICTINGTEXTUREPALETTE, "D3DERR_CONFLICTINGTEXTUREPALETTE") CHK_ERR(D3DERR_DRIVERINTERNALERROR, "D3DERR_DRIVERINTERNALERROR") CHK_ERR(D3DERR_NOTFOUND, "D3DERR_NOTFOUND") CHK_ERR(D3DERR_MOREDATA, "D3DERR_MOREDATA") CHK_ERR(D3DERR_DEVICELOST, "D3DERR_DEVICELOST") CHK_ERR(D3DERR_DEVICENOTRESET, "D3DERR_DEVICENOTRESET") CHK_ERR(D3DERR_NOTAVAILABLE, "D3DERR_NOTAVAILABLE") CHK_ERR(D3DERR_INVALIDDEVICE, "D3DERR_INVALIDDEVICE") CHK_ERR(D3DERR_INVALIDCALL, "D3DERR_INVALIDCALL") CHK_ERR(DSERR_ALLOCATED, "DSERR_ALLOCATED") CHK_ERR(DSERR_CONTROLUNAVAIL, "DSERR_CONTROLUNAVAIL") CHK_ERR(DSERR_INVALIDCALL, "DSERR_INVALIDCALL") CHK_ERR(DSERR_PRIOLEVELNEEDED, "DSERR_PRIOLEVELNEEDED") CHK_ERR(DSERR_BADFORMAT, "DSERR_BADFORMAT") CHK_ERR(DSERR_NODRIVER, "DSERR_NODRIVER") CHK_ERR(DSERR_ALREADYINITIALIZED, "DSERR_ALREADYINITIALIZED") CHK_ERR(DSERR_BUFFERLOST, "DSERR_BUFFERLOST") CHK_ERR(DSERR_OTHERAPPHASPRIO, "DSERR_OTHERAPPHASPRIO") CHK_ERR(DSERR_UNINITIALIZED, "DSERR_UNINITIALIZED") CHK_ERR(DMUS_E_DRIVER_FAILED, "DMUS_E_DRIVER_FAILED") CHK_ERR(DMUS_E_PORTS_OPEN, "DMUS_E_PORTS_OPEN") CHK_ERR(DMUS_E_DEVICE_IN_USE, "DMUS_E_DEVICE_IN_USE") CHK_ERR(DMUS_E_INSUFFICIENTBUFFER, "DMUS_E_INSUFFICIENTBUFFER") CHK_ERR(DMUS_E_BUFFERNOTSET, "DMUS_E_BUFFERNOTSET") CHK_ERR(DMUS_E_BUFFERNOTAVAILABLE, "DMUS_E_BUFFERNOTAVAILABLE") CHK_ERR(DMUS_E_NOTADLSCOL, "DMUS_E_NOTADLSCOL") CHK_ERR(DMUS_E_INVALIDOFFSET, "DMUS_E_INVALIDOFFSET") CHK_ERR(DMUS_E_ALREADY_LOADED, "DMUS_E_ALREADY_LOADED") CHK_ERR(DMUS_E_INVALIDPOS, "DMUS_E_INVALIDPOS") CHK_ERR(DMUS_E_INVALIDPATCH, "DMUS_E_INVALIDPATCH") CHK_ERR(DMUS_E_CANNOTSEEK, "DMUS_E_CANNOTSEEK") CHK_ERR(DMUS_E_CANNOTWRITE, "DMUS_E_CANNOTWRITE") CHK_ERR(DMUS_E_CHUNKNOTFOUND, "DMUS_E_CHUNKNOTFOUND") CHK_ERR(DMUS_E_INVALID_DOWNLOADID, "DMUS_E_INVALID_DOWNLOADID") CHK_ERR(DMUS_E_NOT_DOWNLOADED_TO_PORT, "DMUS_E_NOT_DOWNLOADED_TO_PORT") CHK_ERR(DMUS_E_ALREADY_DOWNLOADED, "DMUS_E_ALREADY_DOWNLOADED") CHK_ERR(DMUS_E_UNKNOWN_PROPERTY, "DMUS_E_UNKNOWN_PROPERTY") CHK_ERR(DMUS_E_SET_UNSUPPORTED, "DMUS_E_SET_UNSUPPORTED") CHK_ERR(DMUS_E_GET_UNSUPPORTED, "DMUS_E_GET_UNSUPPORTED") CHK_ERR(DMUS_E_NOTMONO, "DMUS_E_NOTMONO") CHK_ERR(DMUS_E_BADARTICULATION, "DMUS_E_BADARTICULATION") CHK_ERR(DMUS_E_BADINSTRUMENT, "DMUS_E_BADINSTRUMENT") CHK_ERR(DMUS_E_BADWAVELINK, "DMUS_E_BADWAVELINK") CHK_ERR(DMUS_E_NOARTICULATION, "DMUS_E_NOARTICULATION") CHK_ERR(DMUS_E_NOTPCM, "DMUS_E_NOTPCM") CHK_ERR(DMUS_E_BADWAVE, "DMUS_E_BADWAVE") CHK_ERR(DMUS_E_BADOFFSETTABLE, "DMUS_E_BADOFFSETTABLE") CHK_ERR(DMUS_E_UNKNOWNDOWNLOAD, "DMUS_E_UNKNOWNDOWNLOAD") CHK_ERR(DMUS_E_NOSYNTHSINK, "DMUS_E_NOSYNTHSINK") CHK_ERR(DMUS_E_ALREADYOPEN, "DMUS_E_ALREADYOPEN") CHK_ERR(DMUS_E_ALREADYCLOSED, "DMUS_E_ALREADYCLOSED") CHK_ERR(DMUS_E_SYNTHNOTCONFIGURED, "DMUS_E_SYNTHNOTCONFIGURED") CHK_ERR(DMUS_E_SYNTHACTIVE, "DMUS_E_SYNTHACTIVE") CHK_ERR(DMUS_E_CANNOTREAD, "DMUS_E_CANNOTREAD") CHK_ERR(DMUS_E_DMUSIC_RELEASED, "DMUS_E_DMUSIC_RELEASED") CHK_ERR(DMUS_E_BUFFER_EMPTY, "DMUS_E_BUFFER_EMPTY") CHK_ERR(DMUS_E_BUFFER_FULL, "DMUS_E_BUFFER_FULL") CHK_ERR(DMUS_E_PORT_NOT_CAPTURE, "DMUS_E_PORT_NOT_CAPTURE") CHK_ERR(DMUS_E_PORT_NOT_RENDER, "DMUS_E_PORT_NOT_RENDER") CHK_ERR(DMUS_E_DSOUND_NOT_SET, "DMUS_E_DSOUND_NOT_SET") CHK_ERR(DMUS_E_ALREADY_ACTIVATED, "DMUS_E_ALREADY_ACTIVATED") CHK_ERR(DMUS_E_INVALIDBUFFER, "DMUS_E_INVALIDBUFFER") CHK_ERR(DMUS_E_WAVEFORMATNOTSUPPORTED, "DMUS_E_WAVEFORMATNOTSUPPORTED") CHK_ERR(DMUS_E_SYNTHINACTIVE, "DMUS_E_SYNTHINACTIVE") CHK_ERR(DMUS_E_DSOUND_ALREADY_SET, "DMUS_E_DSOUND_ALREADY_SET") CHK_ERR(DMUS_E_INVALID_EVENT, "DMUS_E_INVALID_EVENT") CHK_ERR(DMUS_E_UNSUPPORTED_STREAM, "DMUS_E_UNSUPPORTED_STREAM") CHK_ERR(DMUS_E_ALREADY_INITED, "DMUS_E_ALREADY_INITED") CHK_ERR(DMUS_E_INVALID_BAND, "DMUS_E_INVALID_BAND") CHK_ERR(DMUS_E_TRACK_HDR_NOT_FIRST_CK, "DMUS_E_TRACK_HDR_NOT_FIRST_CK") CHK_ERR(DMUS_E_TOOL_HDR_NOT_FIRST_CK, "DMUS_E_TOOL_HDR_NOT_FIRST_CK") CHK_ERR(DMUS_E_INVALID_TRACK_HDR, "DMUS_E_INVALID_TRACK_HDR") CHK_ERR(DMUS_E_INVALID_TOOL_HDR, "DMUS_E_INVALID_TOOL_HDR") CHK_ERR(DMUS_E_ALL_TOOLS_FAILED, "DMUS_E_ALL_TOOLS_FAILED") CHK_ERR(DMUS_E_ALL_TRACKS_FAILED, "DMUS_E_ALL_TRACKS_FAILED") CHK_ERR(DMUS_E_NOT_FOUND, "DMUS_E_NOT_FOUND") CHK_ERR(DMUS_E_NOT_INIT, "DMUS_E_NOT_INIT") CHK_ERR(DMUS_E_TYPE_DISABLED, "DMUS_E_TYPE_DISABLED") CHK_ERR(DMUS_E_TYPE_UNSUPPORTED, "DMUS_E_TYPE_UNSUPPORTED") CHK_ERR(DMUS_E_TIME_PAST, "DMUS_E_TIME_PAST") CHK_ERR(DMUS_E_TRACK_NOT_FOUND, "DMUS_E_TRACK_NOT_FOUND") CHK_ERR(DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT, "DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT") CHK_ERR(DMUS_E_NO_MASTER_CLOCK, "DMUS_E_NO_MASTER_CLOCK") CHK_ERR(DMUS_E_LOADER_NOCLASSID, "DMUS_E_LOADER_NOCLASSID") CHK_ERR(DMUS_E_LOADER_BADPATH, "DMUS_E_LOADER_BADPATH") CHK_ERR(DMUS_E_LOADER_FAILEDOPEN, "DMUS_E_LOADER_FAILEDOPEN") CHK_ERR(DMUS_E_LOADER_FORMATNOTSUPPORTED, "DMUS_E_LOADER_FORMATNOTSUPPORTED") CHK_ERR(DMUS_E_LOADER_FAILEDCREATE, "DMUS_E_LOADER_FAILEDCREATE") CHK_ERR(DMUS_E_LOADER_OBJECTNOTFOUND, "DMUS_E_LOADER_OBJECTNOTFOUND") CHK_ERR(DMUS_E_LOADER_NOFILENAME, "DMUS_E_LOADER_NOFILENAME") CHK_ERR(DMUS_E_INVALIDFILE, "DMUS_E_INVALIDFILE") CHK_ERR(DMUS_E_ALREADY_EXISTS, "DMUS_E_ALREADY_EXISTS") CHK_ERR(DMUS_E_OUT_OF_RANGE, "DMUS_E_OUT_OF_RANGE") CHK_ERR(DMUS_E_SEGMENT_INIT_FAILED, "DMUS_E_SEGMENT_INIT_FAILED") CHK_ERR(DMUS_E_ALREADY_SENT, "DMUS_E_ALREADY_SENT") CHK_ERR(DMUS_E_CANNOT_FREE, "DMUS_E_CANNOT_FREE") CHK_ERR(DMUS_E_CANNOT_OPEN_PORT, "DMUS_E_CANNOT_OPEN_PORT") CHK_ERR(DMUS_E_CANNOT_CONVERT, "DMUS_E_CANNOT_CONVERT") CHK_ERR(DMUS_E_DESCEND_CHUNK_FAIL, "DMUS_E_DESCEND_CHUNK_FAIL") CHK_ERR(DMUS_E_NOT_LOADED, "DMUS_E_NOT_LOADED") CHK_ERR(DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE, "DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE") CHK_ERR(DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE, "DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE") CHK_ERR(DMUS_E_SCRIPT_ERROR_IN_SCRIPT, "DMUS_E_SCRIPT_ERROR_IN_SCRIPT") CHK_ERR(DMUS_E_SCRIPT_CANTLOAD_OLEAUT32, "DMUS_E_SCRIPT_CANTLOAD_OLEAUT32") CHK_ERR(DMUS_E_SCRIPT_LOADSCRIPT_ERROR, "DMUS_E_SCRIPT_LOADSCRIPT_ERROR") CHK_ERR(DMUS_E_SCRIPT_INVALID_FILE, "DMUS_E_SCRIPT_INVALID_FILE") CHK_ERR(DMUS_E_INVALID_SCRIPTTRACK, "DMUS_E_INVALID_SCRIPTTRACK") CHK_ERR(DMUS_E_SCRIPT_VARIABLE_NOT_FOUND, "DMUS_E_SCRIPT_VARIABLE_NOT_FOUND") CHK_ERR(DMUS_E_SCRIPT_ROUTINE_NOT_FOUND, "DMUS_E_SCRIPT_ROUTINE_NOT_FOUND") CHK_ERR(DMUS_E_INVALID_SEGMENTTRIGGERTRACK, "DMUS_E_INVALID_SEGMENTTRIGGERTRACK") CHK_ERR(DMUS_E_INVALID_LYRICSTRACK, "DMUS_E_INVALID_LYRICSTRACK") CHK_ERR(DMUS_E_INVALID_PARAMCONTROLTRACK, "DMUS_E_INVALID_PARAMCONTROLTRACK") CHK_ERR(DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR, "DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR") CHK_ERR(DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR, "DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR") CHK_ERR(DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE, "DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE") CHK_ERR(DMUS_E_AUDIOPATHS_NOT_VALID, "DMUS_E_AUDIOPATHS_NOT_VALID") CHK_ERR(DMUS_E_AUDIOPATHS_IN_USE, "DMUS_E_AUDIOPATHS_IN_USE") CHK_ERR(DMUS_E_NO_AUDIOPATH_CONFIG, "DMUS_E_NO_AUDIOPATH_CONFIG") CHK_ERR(DMUS_E_AUDIOPATH_INACTIVE, "DMUS_E_AUDIOPATH_INACTIVE") CHK_ERR(DMUS_E_AUDIOPATH_NOBUFFER, "DMUS_E_AUDIOPATH_NOBUFFER") CHK_ERR(DMUS_E_AUDIOPATH_NOPORT, "DMUS_E_AUDIOPATH_NOPORT") CHK_ERR(DMUS_E_NO_AUDIOPATH, "DMUS_E_NO_AUDIOPATH") CHK_ERR(DMUS_E_INVALIDCHUNK, "DMUS_E_INVALIDCHUNK") CHK_ERR(DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER, "DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER") CHK_ERR(DMUS_E_INVALID_CONTAINER_OBJECT, "DMUS_E_INVALID_CONTAINER_OBJECT") /* NO APPMAN SUPPORT FOR NOW CHK_ERR(APPMAN_E_NOTINITIALIZED, "APPMAN_E_NOTINITIALIZED") CHK_ERR(APPMAN_E_INVALIDPROPERTYSIZE, "APPMAN_E_INVALIDPROPERTYSIZE") CHK_ERR(APPMAN_E_INVALIDDATA, "APPMAN_E_INVALIDDATA") CHK_ERR(APPMAN_E_INVALIDPROPERTY, "APPMAN_E_INVALIDPROPERTY") CHK_ERR(APPMAN_E_READONLYPROPERTY, "APPMAN_E_READONLYPROPERTY") CHK_ERR(APPMAN_E_PROPERTYNOTSET, "APPMAN_E_PROPERTYNOTSET") CHK_ERR(APPMAN_E_OVERFLOW, "APPMAN_E_OVERFLOW") CHK_ERR(APPMAN_E_INVALIDPROPERTYVALUE, "APPMAN_E_INVALIDPROPERTYVALUE") CHK_ERR(APPMAN_E_ACTIONINPROGRESS, "APPMAN_E_ACTIONINPROGRESS") CHK_ERR(APPMAN_E_ACTIONNOTINITIALIZED, "APPMAN_E_ACTIONNOTINITIALIZED") CHK_ERR(APPMAN_E_REQUIREDPROPERTIESMISSING, "APPMAN_E_REQUIREDPROPERTIESMISSING") CHK_ERR(APPMAN_E_APPLICATIONALREADYEXISTS, "APPMAN_E_APPLICATIONALREADYEXISTS") CHK_ERR(APPMAN_E_APPLICATIONALREADYLOCKED, "APPMAN_E_APPLICATIONALREADYLOCKED") CHK_ERR(APPMAN_E_NODISKSPACEAVAILABLE, "APPMAN_E_NODISKSPACEAVAILABLE") CHK_ERR(APPMAN_E_UNKNOWNAPPLICATION, "APPMAN_E_UNKNOWNAPPLICATION") CHK_ERR(APPMAN_E_INVALIDPARAMETERS, "APPMAN_E_INVALIDPARAMETERS") CHK_ERR(APPMAN_E_OBJECTLOCKED, "APPMAN_E_OBJECTLOCKED") CHK_ERR(APPMAN_E_INVALIDINDEX, "APPMAN_E_INVALIDINDEX") CHK_ERR(APPMAN_E_REGISTRYCORRUPT, "APPMAN_E_REGISTRYCORRUPT") CHK_ERR(APPMAN_E_CANNOTASSOCIATE, "APPMAN_E_CANNOTASSOCIATE") CHK_ERR(APPMAN_E_INVALIDASSOCIATION, "APPMAN_E_INVALIDASSOCIATION") CHK_ERR(APPMAN_E_ALREADYASSOCIATED, "APPMAN_E_ALREADYASSOCIATED") CHK_ERR(APPMAN_E_APPLICATIONREQUIRED, "APPMAN_E_APPLICATIONREQUIRED") CHK_ERR(APPMAN_E_INVALIDEXECUTECMDLINE, "APPMAN_E_INVALIDEXECUTECMDLINE") CHK_ERR(APPMAN_E_INVALIDDOWNSIZECMDLINE, "APPMAN_E_INVALIDDOWNSIZECMDLINE") CHK_ERR(APPMAN_E_INVALIDREINSTALLCMDLINE, "APPMAN_E_INVALIDREINSTALLCMDLINE") CHK_ERR(APPMAN_E_INVALIDUNINSTALLCMDLINE, "APPMAN_E_INVALIDUNINSTALLCMDLINE") CHK_ERR(APPMAN_E_INVALIDSELFTESTCMDLINE, "APPMAN_E_INVALIDSELFTESTCMDLINE") CHK_ERR(APPMAN_E_PARENTAPPNOTREADY, "APPMAN_E_PARENTAPPNOTREADY") CHK_ERR(APPMAN_E_INVALIDSTATE, "APPMAN_E_INVALIDSTATE") CHK_ERR(APPMAN_E_INVALIDROOTPATH, "APPMAN_E_INVALIDROOTPATH") CHK_ERR(APPMAN_E_CACHEOVERRUN, "APPMAN_E_CACHEOVERRUN") CHK_ERR(APPMAN_E_REINSTALLDX, "APPMAN_E_REINSTALLDX") */ } return "Unknown"; } /****************************************************/ /* DXGetErrorString8W */ /* */ /****************************************************/ const WCHAR * __stdcall DXGetErrorString8W(HRESULT hr) { switch(hr) { // Common Win32 error codes CHK_ERR(S_OK, L"S_OK") CHK_ERR(S_FALSE, L"S_FALSE") CHK_ERR(E_UNEXPECTED, L"E_UNEXPECTED") CHK_ERR(E_NOTIMPL, L"E_NOTIMPL") CHK_ERR(E_OUTOFMEMORY, L"E_OUTOFMEMORY") CHK_ERR(E_INVALIDARG, L"E_INVALIDARG") CHK_ERR(E_NOINTERFACE, L"E_NOINTERFACE") CHK_ERR(E_POINTER, L"E_POINTER") CHK_ERR(E_HANDLE, L"E_HANDLE") CHK_ERR(E_ABORT, L"E_ABORT") CHK_ERR(E_FAIL, L"E_FAIL") CHK_ERR(E_ACCESSDENIED, L"E_ACCESSDENIED") CHK_ERR(E_PENDING, L"E_PENDING") CHK_ERR(REGDB_E_CLASSNOTREG, L"REGDB_E_CLASSNOTREG") CHK_ERR(CO_E_NOTINITIALIZED, L"CO_E_NOTINITIALIZED") CHK_ERR(CO_E_ALREADYINITIALIZED, L"CO_E_ALREADYINITIALIZED") // CHK_ERR(DIERR_GENERIC, L"E_FAIL") CHK_ERR(DIERR_NOAGGREGATION, L"E_NOAGGREGATION") CHK_ERR(DIERR_INSUFFICIENTPRIVS, L"DIERR_INSUFFICIENTPRIVS") CHK_ERR(DIERR_DEVICEFULL, L"DIERR_DEVICEFULL") CHK_ERR(DIERR_MOREDATA, L"DIERR_MOREDATA") CHK_ERR(DIERR_NOTDOWNLOADED, L"DIERR_NOTDOWNLOADED") CHK_ERR(DIERR_HASEFFECTS, L"DIERR_HASEFFECTS") CHK_ERR(DIERR_NOTEXCLUSIVEACQUIRED, L"DIERR_NOTEXCLUSIVEACQUIRED") CHK_ERR(DIERR_INCOMPLETEEFFECT, L"DIERR_INCOMPLETEEFFECT") CHK_ERR(DIERR_NOTBUFFERED, L"DIERR_NOTBUFFERED") CHK_ERR(DIERR_EFFECTPLAYING, L"DIERR_EFFECTPLAYING") CHK_ERR(DIERR_UNPLUGGED, L"DIERR_UNPLUGGED") CHK_ERR(DIERR_REPORTFULL, L"DIERR_REPORTFULL") CHK_ERR(DIERR_DRIVERFIRST, L"DIERR_DRIVERFIRST") CHK_ERR(DIERR_DRIVERLAST, L"DIERR_DRIVERLAST") CHK_ERR(DIERR_INVALIDCLASSINSTALLER, L"DIERR_INVALIDCLASSINSTALLER") CHK_ERR(DIERR_CANCELLED, L"DIERR_CANCELLED") CHK_ERR(DIERR_BADINF, L"DIERR_BADINF") CHK_ERR(DIERR_NOTFOUND, L"DIERR_NOTFOUND or DIERR_NOTFOUND") // CHK_ERR(DIERR_READONLY, L"DIERR_READONLY or DIERR_OTHERAPPHASPRIO or DIERR_HANDLEEXISTS or DSERR_ACCESSDENIED") CHK_ERR(DIERR_NOTACQUIRED, L"DIERR_NOTACQUIRED") // CHK_ERR(DIERR_OUTOFMEMORY, L"E_OUTOFMEMORY") CHK_ERR(DIERR_NOTINITIALIZED, L"DIERR_NOTINITIALIZED") CHK_ERR(DIERR_INPUTLOST, L"DIERR_INPUTLOST") CHK_ERR(DIERR_BADDRIVERVER, L"DIERR_BADDRIVERVER") CHK_ERR(DIERR_ACQUIRED, L"DIERR_ACQUIRED") CHK_ERR(DIERR_NOMOREITEMS, L"DIERR_NOMOREITEMS") CHK_ERR(DIERR_OLDDIRECTINPUTVERSION, L"DIERR_OLDDIRECTINPUTVERSION") CHK_ERR(DIERR_BETADIRECTINPUTVERSION, L"DIERR_BETADIRECTINPUTVERSION") CHK_ERR(DIERR_ALREADYINITIALIZED, L"DIERR_ALREADYINITIALIZED") CHK_ERR(DVERR_BUFFERTOOSMALL, L"DVERR_BUFFERTOOSMALL") CHK_ERR(DVERR_EXCEPTION, L"DVERR_EXCEPTION") CHK_ERR(DVERR_INVALIDFLAGS, L"DVERR_INVALIDFLAGS") CHK_ERR(DVERR_INVALIDOBJECT, L"DVERR_INVALIDOBJECT") CHK_ERR(DVERR_INVALIDPLAYER, L"DVERR_INVALIDPLAYER") CHK_ERR(DVERR_INVALIDGROUP, L"DVERR_INVALIDGROUP") CHK_ERR(DVERR_INVALIDHANDLE, L"DVERR_INVALIDHANDLE") CHK_ERR(DVERR_SESSIONLOST, L"DVERR_SESSIONLOST") CHK_ERR(DVERR_NOVOICESESSION, L"DVERR_NOVOICESESSION") CHK_ERR(DVERR_CONNECTIONLOST, L"DVERR_CONNECTIONLOST") CHK_ERR(DVERR_NOTINITIALIZED, L"DVERR_NOTINITIALIZED") CHK_ERR(DVERR_CONNECTED, L"DVERR_CONNECTED") CHK_ERR(DVERR_NOTCONNECTED, L"DVERR_NOTCONNECTED") CHK_ERR(DVERR_CONNECTABORTING, L"DVERR_CONNECTABORTING") CHK_ERR(DVERR_NOTALLOWED, L"DVERR_NOTALLOWED") CHK_ERR(DVERR_INVALIDTARGET, L"DVERR_INVALIDTARGET") CHK_ERR(DVERR_TRANSPORTNOTHOST, L"DVERR_TRANSPORTNOTHOST") CHK_ERR(DVERR_COMPRESSIONNOTSUPPORTED, L"DVERR_COMPRESSIONNOTSUPPORTED") CHK_ERR(DVERR_ALREADYPENDING, L"DVERR_ALREADYPENDING") CHK_ERR(DVERR_SOUNDINITFAILURE, L"DVERR_SOUNDINITFAILURE") CHK_ERR(DVERR_TIMEOUT, L"DVERR_TIMEOUT") CHK_ERR(DVERR_CONNECTABORTED, L"DVERR_CONNECTABORTED") CHK_ERR(DVERR_NO3DSOUND, L"DVERR_NO3DSOUND") CHK_ERR(DVERR_ALREADYBUFFERED, L"DVERR_ALREADYBUFFERED") CHK_ERR(DVERR_NOTBUFFERED, L"DVERR_NOTBUFFERED") CHK_ERR(DVERR_HOSTING, L"DVERR_HOSTING") CHK_ERR(DVERR_NOTHOSTING, L"DVERR_NOTHOSTING") CHK_ERR(DVERR_INVALIDDEVICE, L"DVERR_INVALIDDEVICE") CHK_ERR(DVERR_RECORDSYSTEMERROR, L"DVERR_RECORDSYSTEMERROR") CHK_ERR(DVERR_PLAYBACKSYSTEMERROR, L"DVERR_PLAYBACKSYSTEMERROR") CHK_ERR(DVERR_SENDERROR, L"DVERR_SENDERROR") CHK_ERR(DVERR_USERCANCEL, L"DVERR_USERCANCEL") CHK_ERR(DVERR_RUNSETUP, L"DVERR_RUNSETUP") CHK_ERR(DVERR_INCOMPATIBLEVERSION, L"DVERR_INCOMPATIBLEVERSION") CHK_ERR(DVERR_INITIALIZED, L"DVERR_INITIALIZED") CHK_ERR(DVERR_NOTRANSPORT, L"DVERR_NOTRANSPORT") CHK_ERR(DVERR_NOCALLBACK, L"DVERR_NOCALLBACK") CHK_ERR(DVERR_TRANSPORTNOTINIT, L"DVERR_TRANSPORTNOTINIT") CHK_ERR(DVERR_TRANSPORTNOSESSION, L"DVERR_TRANSPORTNOSESSION") CHK_ERR(DVERR_TRANSPORTNOPLAYER, L"DVERR_TRANSPORTNOPLAYER") CHK_ERR(DVERR_USERBACK, L"DVERR_USERBACK") CHK_ERR(DVERR_NORECVOLAVAILABLE, L"DVERR_NORECVOLAVAILABLE") CHK_ERR(DPNERR_ABORTED, L"DPNERR_ABORTED") CHK_ERR(DPNERR_ADDRESSING, L"DPNERR_ADDRESSING") CHK_ERR(DPNERR_ALREADYCONNECTED, L"DPNERR_ALREADYCONNECTED") CHK_ERR(DPNERR_ALREADYDISCONNECTING, L"DPNERR_ALREADYDISCONNECTING") CHK_ERR(DPNERR_ALREADYINITIALIZED, L"DPNERR_ALREADYINITIALIZED") CHK_ERR(DPNERR_ALREADYREGISTERED, L"DPNERR_ALREADYREGISTERED") CHK_ERR(DPNERR_BUFFERTOOSMALL, L"DPNERR_BUFFERTOOSMALL") CHK_ERR(DPNERR_CANNOTCANCEL, L"DPNERR_CANNOTCANCEL") CHK_ERR(DPNERR_CANTCREATEGROUP, L"DPNERR_CANTCREATEGROUP") CHK_ERR(DPNERR_CANTCREATEPLAYER, L"DPNERR_CANTCREATEPLAYER") CHK_ERR(DPNERR_CANTLAUNCHAPPLICATION, L"DPNERR_CANTLAUNCHAPPLICATION") CHK_ERR(DPNERR_CONNECTING, L"DPNERR_CONNECTING") CHK_ERR(DPNERR_CONNECTIONLOST, L"DPNERR_CONNECTIONLOST") CHK_ERR(DPNERR_CONVERSION, L"DPNERR_CONVERSION") CHK_ERR(DPNERR_DOESNOTEXIST, L"DPNERR_DOESNOTEXIST") CHK_ERR(DPNERR_DUPLICATECOMMAND, L"DPNERR_DUPLICATECOMMAND") CHK_ERR(DPNERR_ENDPOINTNOTRECEIVING, L"DPNERR_ENDPOINTNOTRECEIVING") CHK_ERR(DPNERR_EXCEPTION, L"DPNERR_EXCEPTION") CHK_ERR(DPNERR_GROUPNOTEMPTY, L"DPNERR_GROUPNOTEMPTY") CHK_ERR(DPNERR_HOSTING, L"DPNERR_HOSTING") CHK_ERR(DPNERR_HOSTREJECTEDCONNECTION, L"DPNERR_HOSTREJECTEDCONNECTION") CHK_ERR(DPNERR_INCOMPLETEADDRESS, L"DPNERR_INCOMPLETEADDRESS") CHK_ERR(DPNERR_INVALIDADDRESSFORMAT, L"DPNERR_INVALIDADDRESSFORMAT") CHK_ERR(DPNERR_INVALIDAPPLICATION, L"DPNERR_INVALIDAPPLICATION") CHK_ERR(DPNERR_INVALIDCOMMAND, L"DPNERR_INVALIDCOMMAND") CHK_ERR(DPNERR_INVALIDENDPOINT, L"DPNERR_INVALIDENDPOINT") CHK_ERR(DPNERR_INVALIDFLAGS, L"DPNERR_INVALIDFLAGS") CHK_ERR(DPNERR_INVALIDGROUP, L"DPNERR_INVALIDGROUP") CHK_ERR(DPNERR_INVALIDHANDLE, L"DPNERR_INVALIDHANDLE") CHK_ERR(DPNERR_INVALIDINSTANCE, L"DPNERR_INVALIDINSTANCE") CHK_ERR(DPNERR_INVALIDINTERFACE, L"DPNERR_INVALIDINTERFACE") CHK_ERR(DPNERR_INVALIDDEVICEADDRESS, L"DPNERR_INVALIDDEVICEADDRESS") CHK_ERR(DPNERR_INVALIDOBJECT, L"DPNERR_INVALIDOBJECT") CHK_ERR(DPNERR_INVALIDPASSWORD, L"DPNERR_INVALIDPASSWORD") CHK_ERR(DPNERR_INVALIDPLAYER, L"DPNERR_INVALIDPLAYER") CHK_ERR(DPNERR_INVALIDPRIORITY, L"DPNERR_INVALIDPRIORITY") CHK_ERR(DPNERR_INVALIDHOSTADDRESS, L"DPNERR_INVALIDHOSTADDRESS") CHK_ERR(DPNERR_INVALIDSTRING, L"DPNERR_INVALIDSTRING") CHK_ERR(DPNERR_INVALIDURL, L"DPNERR_INVALIDURL") CHK_ERR(DPNERR_NOCAPS, L"DPNERR_NOCAPS") CHK_ERR(DPNERR_NOCONNECTION, L"DPNERR_NOCONNECTION") CHK_ERR(DPNERR_NOHOSTPLAYER, L"DPNERR_NOHOSTPLAYER") CHK_ERR(DPNERR_NOMOREADDRESSCOMPONENTS, L"DPNERR_NOMOREADDRESSCOMPONENTS") CHK_ERR(DPNERR_NORESPONSE, L"DPNERR_NORESPONSE") CHK_ERR(DPNERR_NOTALLOWED, L"DPNERR_NOTALLOWED") CHK_ERR(DPNERR_NOTHOST, L"DPNERR_NOTHOST") CHK_ERR(DPNERR_NOTREADY, L"DPNERR_NOTREADY") CHK_ERR(DPNERR_NOTREGISTERED, L"DPNERR_NOTREGISTERED") CHK_ERR(DPNERR_PLAYERLOST, L"DPNERR_PLAYERLOST") CHK_ERR(DPNERR_SENDTOOLARGE, L"DPNERR_SENDTOOLARGE") CHK_ERR(DPNERR_SESSIONFULL, L"DPNERR_SESSIONFULL") CHK_ERR(DPNERR_TABLEFULL, L"DPNERR_TABLEFULL") CHK_ERR(DPNERR_TIMEDOUT, L"DPNERR_TIMEDOUT") CHK_ERR(DPNERR_UNINITIALIZED, L"DPNERR_UNINITIALIZED") CHK_ERR(DPNERR_USERCANCEL, L"DPNERR_USERCANCEL") CHK_ERR(DXFILEERR_BADOBJECT, L"DXFILEERR_BADOBJECT") CHK_ERR(DXFILEERR_BADVALUE, L"DXFILEERR_BADVALUE") CHK_ERR(DXFILEERR_BADTYPE, L"DXFILEERR_BADTYPE") CHK_ERR(DXFILEERR_BADSTREAMHANDLE, L"DXFILEERR_BADSTREAMHANDLE") CHK_ERR(DXFILEERR_BADALLOC, L"DXFILEERR_BADALLOC") CHK_ERR(DXFILEERR_NOTFOUND, L"DXFILEERR_NOTFOUND") CHK_ERR(DXFILEERR_NOTDONEYET, L"DXFILEERR_NOTDONEYET") CHK_ERR(DXFILEERR_FILENOTFOUND, L"DXFILEERR_FILENOTFOUND") CHK_ERR(DXFILEERR_RESOURCENOTFOUND, L"DXFILEERR_RESOURCENOTFOUND") CHK_ERR(DXFILEERR_URLNOTFOUND, L"DXFILEERR_URLNOTFOUND") CHK_ERR(DXFILEERR_BADRESOURCE, L"DXFILEERR_BADRESOURCE") CHK_ERR(DXFILEERR_BADFILETYPE, L"DXFILEERR_BADFILETYPE") CHK_ERR(DXFILEERR_BADFILEVERSION, L"DXFILEERR_BADFILEVERSION") CHK_ERR(DXFILEERR_BADFILEFLOATSIZE, L"DXFILEERR_BADFILEFLOATSIZE") CHK_ERR(DXFILEERR_BADFILECOMPRESSIONTYPE, L"DXFILEERR_BADFILECOMPRESSIONTYPE") CHK_ERR(DXFILEERR_BADFILE, L"DXFILEERR_BADFILE") CHK_ERR(DXFILEERR_PARSEERROR, L"DXFILEERR_PARSEERROR") CHK_ERR(DXFILEERR_NOTEMPLATE, L"DXFILEERR_NOTEMPLATE") CHK_ERR(DXFILEERR_BADARRAYSIZE, L"DXFILEERR_BADARRAYSIZE") CHK_ERR(DXFILEERR_BADDATAREFERENCE, L"DXFILEERR_BADDATAREFERENCE") CHK_ERR(DXFILEERR_INTERNALERROR, L"DXFILEERR_INTERNALERROR") CHK_ERR(DXFILEERR_NOMOREOBJECTS, L"DXFILEERR_NOMOREOBJECTS") CHK_ERR(DXFILEERR_BADINTRINSICS, L"DXFILEERR_BADINTRINSICS") CHK_ERR(DXFILEERR_NOMORESTREAMHANDLES, L"DXFILEERR_NOMORESTREAMHANDLES") CHK_ERR(DXFILEERR_NOMOREDATA, L"DXFILEERR_NOMOREDATA") CHK_ERR(DXFILEERR_BADCACHEFILE, L"DXFILEERR_BADCACHEFILE") CHK_ERR(DXFILEERR_NOINTERNET, L"DXFILEERR_NOINTERNET") CHK_ERR(D3DERR_OUTOFVIDEOMEMORY, L"D3DERR_OUTOFVIDEOMEMORY") CHK_ERR(D3DERR_WRONGTEXTUREFORMAT, L"D3DERR_WRONGTEXTUREFORMAT") CHK_ERR(D3DERR_UNSUPPORTEDCOLOROPERATION, L"D3DERR_UNSUPPORTEDCOLOROPERATION") CHK_ERR(D3DERR_UNSUPPORTEDCOLORARG, L"D3DERR_UNSUPPORTEDCOLORARG") CHK_ERR(D3DERR_UNSUPPORTEDALPHAOPERATION, L"D3DERR_UNSUPPORTEDALPHAOPERATION") CHK_ERR(D3DERR_UNSUPPORTEDALPHAARG, L"D3DERR_UNSUPPORTEDALPHAARG") CHK_ERR(D3DERR_TOOMANYOPERATIONS, L"D3DERR_TOOMANYOPERATIONS") CHK_ERR(D3DERR_CONFLICTINGTEXTUREFILTER, L"D3DERR_CONFLICTINGTEXTUREFILTER") CHK_ERR(D3DERR_UNSUPPORTEDFACTORVALUE, L"D3DERR_UNSUPPORTEDFACTORVALUE") CHK_ERR(D3DERR_CONFLICTINGRENDERSTATE, L"D3DERR_CONFLICTINGRENDERSTATE") CHK_ERR(D3DERR_UNSUPPORTEDTEXTUREFILTER, L"D3DERR_UNSUPPORTEDTEXTUREFILTER") CHK_ERR(D3DERR_CONFLICTINGTEXTUREPALETTE, L"D3DERR_CONFLICTINGTEXTUREPALETTE") CHK_ERR(D3DERR_DRIVERINTERNALERROR, L"D3DERR_DRIVERINTERNALERROR") CHK_ERR(D3DERR_NOTFOUND, L"D3DERR_NOTFOUND") CHK_ERR(D3DERR_MOREDATA, L"D3DERR_MOREDATA") CHK_ERR(D3DERR_DEVICELOST, L"D3DERR_DEVICELOST") CHK_ERR(D3DERR_DEVICENOTRESET, L"D3DERR_DEVICENOTRESET") CHK_ERR(D3DERR_NOTAVAILABLE, L"D3DERR_NOTAVAILABLE") CHK_ERR(D3DERR_INVALIDDEVICE, L"D3DERR_INVALIDDEVICE") CHK_ERR(D3DERR_INVALIDCALL, L"D3DERR_INVALIDCALL") CHK_ERR(DSERR_ALLOCATED, L"DSERR_ALLOCATED") CHK_ERR(DSERR_CONTROLUNAVAIL, L"DSERR_CONTROLUNAVAIL") CHK_ERR(DSERR_INVALIDCALL, L"DSERR_INVALIDCALL") CHK_ERR(DSERR_PRIOLEVELNEEDED, L"DSERR_PRIOLEVELNEEDED") CHK_ERR(DSERR_BADFORMAT, L"DSERR_BADFORMAT") CHK_ERR(DSERR_NODRIVER, L"DSERR_NODRIVER") CHK_ERR(DSERR_ALREADYINITIALIZED, L"DSERR_ALREADYINITIALIZED") CHK_ERR(DSERR_BUFFERLOST, L"DSERR_BUFFERLOST") CHK_ERR(DSERR_OTHERAPPHASPRIO, L"DSERR_OTHERAPPHASPRIO") CHK_ERR(DSERR_UNINITIALIZED, L"DSERR_UNINITIALIZED") CHK_ERR(DMUS_E_DRIVER_FAILED, L"DMUS_E_DRIVER_FAILED") CHK_ERR(DMUS_E_PORTS_OPEN, L"DMUS_E_PORTS_OPEN") CHK_ERR(DMUS_E_DEVICE_IN_USE, L"DMUS_E_DEVICE_IN_USE") CHK_ERR(DMUS_E_INSUFFICIENTBUFFER, L"DMUS_E_INSUFFICIENTBUFFER") CHK_ERR(DMUS_E_BUFFERNOTSET, L"DMUS_E_BUFFERNOTSET") CHK_ERR(DMUS_E_BUFFERNOTAVAILABLE, L"DMUS_E_BUFFERNOTAVAILABLE") CHK_ERR(DMUS_E_NOTADLSCOL, L"DMUS_E_NOTADLSCOL") CHK_ERR(DMUS_E_INVALIDOFFSET, L"DMUS_E_INVALIDOFFSET") CHK_ERR(DMUS_E_ALREADY_LOADED, L"DMUS_E_ALREADY_LOADED") CHK_ERR(DMUS_E_INVALIDPOS, L"DMUS_E_INVALIDPOS") CHK_ERR(DMUS_E_INVALIDPATCH, L"DMUS_E_INVALIDPATCH") CHK_ERR(DMUS_E_CANNOTSEEK, L"DMUS_E_CANNOTSEEK") CHK_ERR(DMUS_E_CANNOTWRITE, L"DMUS_E_CANNOTWRITE") CHK_ERR(DMUS_E_CHUNKNOTFOUND, L"DMUS_E_CHUNKNOTFOUND") CHK_ERR(DMUS_E_INVALID_DOWNLOADID, L"DMUS_E_INVALID_DOWNLOADID") CHK_ERR(DMUS_E_NOT_DOWNLOADED_TO_PORT, L"DMUS_E_NOT_DOWNLOADED_TO_PORT") CHK_ERR(DMUS_E_ALREADY_DOWNLOADED, L"DMUS_E_ALREADY_DOWNLOADED") CHK_ERR(DMUS_E_UNKNOWN_PROPERTY, L"DMUS_E_UNKNOWN_PROPERTY") CHK_ERR(DMUS_E_SET_UNSUPPORTED, L"DMUS_E_SET_UNSUPPORTED") CHK_ERR(DMUS_E_GET_UNSUPPORTED, L"DMUS_E_GET_UNSUPPORTED") CHK_ERR(DMUS_E_NOTMONO, L"DMUS_E_NOTMONO") CHK_ERR(DMUS_E_BADARTICULATION, L"DMUS_E_BADARTICULATION") CHK_ERR(DMUS_E_BADINSTRUMENT, L"DMUS_E_BADINSTRUMENT") CHK_ERR(DMUS_E_BADWAVELINK, L"DMUS_E_BADWAVELINK") CHK_ERR(DMUS_E_NOARTICULATION, L"DMUS_E_NOARTICULATION") CHK_ERR(DMUS_E_NOTPCM, L"DMUS_E_NOTPCM") CHK_ERR(DMUS_E_BADWAVE, L"DMUS_E_BADWAVE") CHK_ERR(DMUS_E_BADOFFSETTABLE, L"DMUS_E_BADOFFSETTABLE") CHK_ERR(DMUS_E_UNKNOWNDOWNLOAD, L"DMUS_E_UNKNOWNDOWNLOAD") CHK_ERR(DMUS_E_NOSYNTHSINK, L"DMUS_E_NOSYNTHSINK") CHK_ERR(DMUS_E_ALREADYOPEN, L"DMUS_E_ALREADYOPEN") CHK_ERR(DMUS_E_ALREADYCLOSED, L"DMUS_E_ALREADYCLOSED") CHK_ERR(DMUS_E_SYNTHNOTCONFIGURED, L"DMUS_E_SYNTHNOTCONFIGURED") CHK_ERR(DMUS_E_SYNTHACTIVE, L"DMUS_E_SYNTHACTIVE") CHK_ERR(DMUS_E_CANNOTREAD, L"DMUS_E_CANNOTREAD") CHK_ERR(DMUS_E_DMUSIC_RELEASED, L"DMUS_E_DMUSIC_RELEASED") CHK_ERR(DMUS_E_BUFFER_EMPTY, L"DMUS_E_BUFFER_EMPTY") CHK_ERR(DMUS_E_BUFFER_FULL, L"DMUS_E_BUFFER_FULL") CHK_ERR(DMUS_E_PORT_NOT_CAPTURE, L"DMUS_E_PORT_NOT_CAPTURE") CHK_ERR(DMUS_E_PORT_NOT_RENDER, L"DMUS_E_PORT_NOT_RENDER") CHK_ERR(DMUS_E_DSOUND_NOT_SET, L"DMUS_E_DSOUND_NOT_SET") CHK_ERR(DMUS_E_ALREADY_ACTIVATED, L"DMUS_E_ALREADY_ACTIVATED") CHK_ERR(DMUS_E_INVALIDBUFFER, L"DMUS_E_INVALIDBUFFER") CHK_ERR(DMUS_E_WAVEFORMATNOTSUPPORTED, L"DMUS_E_WAVEFORMATNOTSUPPORTED") CHK_ERR(DMUS_E_SYNTHINACTIVE, L"DMUS_E_SYNTHINACTIVE") CHK_ERR(DMUS_E_DSOUND_ALREADY_SET, L"DMUS_E_DSOUND_ALREADY_SET") CHK_ERR(DMUS_E_INVALID_EVENT, L"DMUS_E_INVALID_EVENT") CHK_ERR(DMUS_E_UNSUPPORTED_STREAM, L"DMUS_E_UNSUPPORTED_STREAM") CHK_ERR(DMUS_E_ALREADY_INITED, L"DMUS_E_ALREADY_INITED") CHK_ERR(DMUS_E_INVALID_BAND, L"DMUS_E_INVALID_BAND") CHK_ERR(DMUS_E_TRACK_HDR_NOT_FIRST_CK, L"DMUS_E_TRACK_HDR_NOT_FIRST_CK") CHK_ERR(DMUS_E_TOOL_HDR_NOT_FIRST_CK, L"DMUS_E_TOOL_HDR_NOT_FIRST_CK") CHK_ERR(DMUS_E_INVALID_TRACK_HDR, L"DMUS_E_INVALID_TRACK_HDR") CHK_ERR(DMUS_E_INVALID_TOOL_HDR, L"DMUS_E_INVALID_TOOL_HDR") CHK_ERR(DMUS_E_ALL_TOOLS_FAILED, L"DMUS_E_ALL_TOOLS_FAILED") CHK_ERR(DMUS_E_ALL_TRACKS_FAILED, L"DMUS_E_ALL_TRACKS_FAILED") CHK_ERR(DMUS_E_NOT_FOUND, L"DMUS_E_NOT_FOUND") CHK_ERR(DMUS_E_NOT_INIT, L"DMUS_E_NOT_INIT") CHK_ERR(DMUS_E_TYPE_DISABLED, L"DMUS_E_TYPE_DISABLED") CHK_ERR(DMUS_E_TYPE_UNSUPPORTED, L"DMUS_E_TYPE_UNSUPPORTED") CHK_ERR(DMUS_E_TIME_PAST, L"DMUS_E_TIME_PAST") CHK_ERR(DMUS_E_TRACK_NOT_FOUND, L"DMUS_E_TRACK_NOT_FOUND") CHK_ERR(DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT, L"DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT") CHK_ERR(DMUS_E_NO_MASTER_CLOCK, L"DMUS_E_NO_MASTER_CLOCK") CHK_ERR(DMUS_E_LOADER_NOCLASSID, L"DMUS_E_LOADER_NOCLASSID") CHK_ERR(DMUS_E_LOADER_BADPATH, L"DMUS_E_LOADER_BADPATH") CHK_ERR(DMUS_E_LOADER_FAILEDOPEN, L"DMUS_E_LOADER_FAILEDOPEN") CHK_ERR(DMUS_E_LOADER_FORMATNOTSUPPORTED, L"DMUS_E_LOADER_FORMATNOTSUPPORTED") CHK_ERR(DMUS_E_LOADER_FAILEDCREATE, L"DMUS_E_LOADER_FAILEDCREATE") CHK_ERR(DMUS_E_LOADER_OBJECTNOTFOUND, L"DMUS_E_LOADER_OBJECTNOTFOUND") CHK_ERR(DMUS_E_LOADER_NOFILENAME, L"DMUS_E_LOADER_NOFILENAME") CHK_ERR(DMUS_E_INVALIDFILE, L"DMUS_E_INVALIDFILE") CHK_ERR(DMUS_E_ALREADY_EXISTS, L"DMUS_E_ALREADY_EXISTS") CHK_ERR(DMUS_E_OUT_OF_RANGE, L"DMUS_E_OUT_OF_RANGE") CHK_ERR(DMUS_E_SEGMENT_INIT_FAILED, L"DMUS_E_SEGMENT_INIT_FAILED") CHK_ERR(DMUS_E_ALREADY_SENT, L"DMUS_E_ALREADY_SENT") CHK_ERR(DMUS_E_CANNOT_FREE, L"DMUS_E_CANNOT_FREE") CHK_ERR(DMUS_E_CANNOT_OPEN_PORT, L"DMUS_E_CANNOT_OPEN_PORT") CHK_ERR(DMUS_E_CANNOT_CONVERT, L"DMUS_E_CANNOT_CONVERT") CHK_ERR(DMUS_E_DESCEND_CHUNK_FAIL, L"DMUS_E_DESCEND_CHUNK_FAIL") CHK_ERR(DMUS_E_NOT_LOADED, L"DMUS_E_NOT_LOADED") CHK_ERR(DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE, L"DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE") CHK_ERR(DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE, L"DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE") CHK_ERR(DMUS_E_SCRIPT_ERROR_IN_SCRIPT, L"DMUS_E_SCRIPT_ERROR_IN_SCRIPT") CHK_ERR(DMUS_E_SCRIPT_CANTLOAD_OLEAUT32, L"DMUS_E_SCRIPT_CANTLOAD_OLEAUT32") CHK_ERR(DMUS_E_SCRIPT_LOADSCRIPT_ERROR, L"DMUS_E_SCRIPT_LOADSCRIPT_ERROR") CHK_ERR(DMUS_E_SCRIPT_INVALID_FILE, L"DMUS_E_SCRIPT_INVALID_FILE") CHK_ERR(DMUS_E_INVALID_SCRIPTTRACK, L"DMUS_E_INVALID_SCRIPTTRACK") CHK_ERR(DMUS_E_SCRIPT_VARIABLE_NOT_FOUND, L"DMUS_E_SCRIPT_VARIABLE_NOT_FOUND") CHK_ERR(DMUS_E_SCRIPT_ROUTINE_NOT_FOUND, L"DMUS_E_SCRIPT_ROUTINE_NOT_FOUND") CHK_ERR(DMUS_E_INVALID_SEGMENTTRIGGERTRACK, L"DMUS_E_INVALID_SEGMENTTRIGGERTRACK") CHK_ERR(DMUS_E_INVALID_LYRICSTRACK, L"DMUS_E_INVALID_LYRICSTRACK") CHK_ERR(DMUS_E_INVALID_PARAMCONTROLTRACK, L"DMUS_E_INVALID_PARAMCONTROLTRACK") CHK_ERR(DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR, L"DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR") CHK_ERR(DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR, L"DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR") CHK_ERR(DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE, L"DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE") CHK_ERR(DMUS_E_AUDIOPATHS_NOT_VALID, L"DMUS_E_AUDIOPATHS_NOT_VALID") CHK_ERR(DMUS_E_AUDIOPATHS_IN_USE, L"DMUS_E_AUDIOPATHS_IN_USE") CHK_ERR(DMUS_E_NO_AUDIOPATH_CONFIG, L"DMUS_E_NO_AUDIOPATH_CONFIG") CHK_ERR(DMUS_E_AUDIOPATH_INACTIVE, L"DMUS_E_AUDIOPATH_INACTIVE") CHK_ERR(DMUS_E_AUDIOPATH_NOBUFFER, L"DMUS_E_AUDIOPATH_NOBUFFER") CHK_ERR(DMUS_E_AUDIOPATH_NOPORT, L"DMUS_E_AUDIOPATH_NOPORT") CHK_ERR(DMUS_E_NO_AUDIOPATH, L"DMUS_E_NO_AUDIOPATH") CHK_ERR(DMUS_E_INVALIDCHUNK, L"DMUS_E_INVALIDCHUNK") CHK_ERR(DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER, L"DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER") CHK_ERR(DMUS_E_INVALID_CONTAINER_OBJECT, L"DMUS_E_INVALID_CONTAINER_OBJECT") /* APP MAN NOT SUPPORTED CHK_ERR(APPMAN_E_NOTINITIALIZED, L"APPMAN_E_NOTINITIALIZED") CHK_ERR(APPMAN_E_INVALIDPROPERTYSIZE, L"APPMAN_E_INVALIDPROPERTYSIZE") CHK_ERR(APPMAN_E_INVALIDDATA, L"APPMAN_E_INVALIDDATA") CHK_ERR(APPMAN_E_INVALIDPROPERTY, L"APPMAN_E_INVALIDPROPERTY") CHK_ERR(APPMAN_E_READONLYPROPERTY, L"APPMAN_E_READONLYPROPERTY") CHK_ERR(APPMAN_E_PROPERTYNOTSET, L"APPMAN_E_PROPERTYNOTSET") CHK_ERR(APPMAN_E_OVERFLOW, L"APPMAN_E_OVERFLOW") CHK_ERR(APPMAN_E_INVALIDPROPERTYVALUE, L"APPMAN_E_INVALIDPROPERTYVALUE") CHK_ERR(APPMAN_E_ACTIONINPROGRESS, L"APPMAN_E_ACTIONINPROGRESS") CHK_ERR(APPMAN_E_ACTIONNOTINITIALIZED, L"APPMAN_E_ACTIONNOTINITIALIZED") CHK_ERR(APPMAN_E_REQUIREDPROPERTIESMISSING, L"APPMAN_E_REQUIREDPROPERTIESMISSING") CHK_ERR(APPMAN_E_APPLICATIONALREADYEXISTS, L"APPMAN_E_APPLICATIONALREADYEXISTS") CHK_ERR(APPMAN_E_APPLICATIONALREADYLOCKED, L"APPMAN_E_APPLICATIONALREADYLOCKED") CHK_ERR(APPMAN_E_NODISKSPACEAVAILABLE, L"APPMAN_E_NODISKSPACEAVAILABLE") CHK_ERR(APPMAN_E_UNKNOWNAPPLICATION, L"APPMAN_E_UNKNOWNAPPLICATION") CHK_ERR(APPMAN_E_INVALIDPARAMETERS, L"APPMAN_E_INVALIDPARAMETERS") CHK_ERR(APPMAN_E_OBJECTLOCKED, L"APPMAN_E_OBJECTLOCKED") CHK_ERR(APPMAN_E_INVALIDINDEX, L"APPMAN_E_INVALIDINDEX") CHK_ERR(APPMAN_E_REGISTRYCORRUPT, L"APPMAN_E_REGISTRYCORRUPT") CHK_ERR(APPMAN_E_CANNOTASSOCIATE, L"APPMAN_E_CANNOTASSOCIATE") CHK_ERR(APPMAN_E_INVALIDASSOCIATION, L"APPMAN_E_INVALIDASSOCIATION") CHK_ERR(APPMAN_E_ALREADYASSOCIATED, L"APPMAN_E_ALREADYASSOCIATED") CHK_ERR(APPMAN_E_APPLICATIONREQUIRED, L"APPMAN_E_APPLICATIONREQUIRED") CHK_ERR(APPMAN_E_INVALIDEXECUTECMDLINE, L"APPMAN_E_INVALIDEXECUTECMDLINE") CHK_ERR(APPMAN_E_INVALIDDOWNSIZECMDLINE, L"APPMAN_E_INVALIDDOWNSIZECMDLINE") CHK_ERR(APPMAN_E_INVALIDREINSTALLCMDLINE, L"APPMAN_E_INVALIDREINSTALLCMDLINE") CHK_ERR(APPMAN_E_INVALIDUNINSTALLCMDLINE, L"APPMAN_E_INVALIDUNINSTALLCMDLINE") CHK_ERR(APPMAN_E_INVALIDSELFTESTCMDLINE, L"APPMAN_E_INVALIDSELFTESTCMDLINE") CHK_ERR(APPMAN_E_PARENTAPPNOTREADY, L"APPMAN_E_PARENTAPPNOTREADY") CHK_ERR(APPMAN_E_INVALIDSTATE, L"APPMAN_E_INVALIDSTATE") CHK_ERR(APPMAN_E_INVALIDROOTPATH, L"APPMAN_E_INVALIDROOTPATH") CHK_ERR(APPMAN_E_CACHEOVERRUN, L"APPMAN_E_CACHEOVERRUN") CHK_ERR(APPMAN_E_REINSTALLDX, L"APPMAN_E_REINSTALLDX") */ } return L"Unknown"; } //----------------------------------------------------------------------------- // Name: DXTraceW() // Desc: Outputs a formatted error message to the debug stream //----------------------------------------------------------------------------- HRESULT __stdcall DXTraceW( CHAR* strFile, DWORD dwLine, HRESULT hr, WCHAR* strMsg, BOOL bPopMsgBox ) { WCHAR strLine[50]; WCHAR strError[200]; WCHAR strBuffer[BUFFER_SIZE]; swprintf( strLine, L"%ld", dwLine ); if( strFile != NULL ) { if( strlen(strFile) + 200 < BUFFER_SIZE ) { swprintf( strBuffer, L"%S(%s): ", strFile, strLine ); OutputDebugStringW( strBuffer ); } } if( strMsg != NULL ) OutputDebugStringW( strMsg ); swprintf( strError, L"%s (0x%0.8x)", DXGetErrorString8W(hr), hr ); swprintf( strBuffer, L" (hr=%s)", strError ); OutputDebugStringW( strBuffer ); OutputDebugStringW( L"\n" ); if( bPopMsgBox ) { if( wcslen(strMsg) + strlen(strFile) + wcslen(strLine) + wcslen(strError) + 200 < BUFFER_SIZE ) { swprintf( strBuffer, L"File: %S\nLine: %s\nError Code: %s\nCalling: %s", strFile, strLine, strError, strMsg ); MessageBoxW( NULL, strBuffer, L"Unexpected error encountered", MB_OK|MB_ICONERROR ); } } return hr; } //----------------------------------------------------------------------------- // Name: DXTraceA() // Desc: Outputs a formatted error message to the debug stream //----------------------------------------------------------------------------- HRESULT __stdcall DXTraceA( char* strFile, DWORD dwLine, HRESULT hr, char* strMsg, BOOL bPopMsgBox ) { CHAR strLine[50]; CHAR strError[200]; CHAR strBuffer[BUFFER_SIZE]; sprintf( strLine, "%ld", dwLine ); if( strFile != NULL ) { if( strlen(strFile) + 200 < BUFFER_SIZE ) { sprintf( strBuffer, "%s(%s): ", strFile, strLine ); OutputDebugStringA( strBuffer ); } } if( strMsg != NULL ) OutputDebugStringA( strMsg ); sprintf( strError, "%s (0x%0.8x)", DXGetErrorString8A(hr), hr ); sprintf( strBuffer, " (hr=%s)", strError ); OutputDebugStringA( strBuffer ); OutputDebugStringA( "\n" ); if( bPopMsgBox ) { if( strlen(strMsg) + strlen(strFile) + strlen(strLine) + strlen(strError) + 200 < BUFFER_SIZE ) { sprintf( strBuffer, "File: %s\nLine: %s\nError Code: %s\nCalling: %s", strFile, strLine, strError, strMsg ); MessageBoxA( NULL, strBuffer, "Unexpected error encountered", MB_OK|MB_ICONERROR ); } } return hr; }