Microsoft DirectX 8.1 (C++)

Error and Success Codes

Microsoft® DirectShow® returns error and success notifications (return codes) to applications in the form of HRESULT values. A return code's LOWORD portion is the return code itself, in hexadecimal format. After you obtain the return code, a call to the AMGetErrorText function returns the code's text description. The COM Win32 HRESULT documentation contains more information, including how to use the FAILED and SUCCEEDED macros to test return values.

This article contains the following sections:

Typical COM HRESULT Values

The following list presents some of the typical COM error and success codes that DirectShow returns.

Value Meaning
E_FAIL Failure.
E_INVALIDARG Argument is invalid.
E_NOTIMPL Method is not supported.
E_OUTOFMEMORY Insufficient memory.
E_POINTER NULL pointer argument.
E_UNEXPECTED Unexpected error.
NOERROR No error. Numerically equivalent to S_OK.
S_FALSE Success. Condition was FALSE.
S_OK Success. Numerically equivalent to NOERROR.
S_TRUE Success. Condition was TRUE.

HRESULT Values Specific to DirectShow

The following table contains DirectShow-specific error and success codes in numerical order. Return codes beginning with VFW_S_ indicate success overall. An operation might partially succeed and still have a successful return value. For example, VFW_S_SOME_DATA_IGNORED indicates that a file was rendered by ignoring some of its property settings. Return codes beginning with VFW_E_ indicate an error. DirectShow-specific return codes also appear in the Vfwmsgs.h header file. If you encounter an error not listed here, the error code might appear in another source, such as a list of COM or Microsoft Windows® 9x errors. For example, Microsoft Visual C++® users can find COM or Windows 9x errors in the Winerror.h include file.

C/C++ programmers receive error codes in complete (32-bit) hexadecimal format. Microsoft Visual Basic® programmers, on the other hand, will see only the decimal equivalent of the error code's first 16-bit portion. This value appears in an error notification dialog box or in the Err object as a run-time error. If the error is not in the following list, you must convert the decimal number to its hexadecimal equivalent, and then look for the error as described previously. Note that the error's hexadecimal version will be a maximum of four digits long; to find the error, match the last four digits of the hexadecimal code in the error code list to the converted run-time error.

Return code Description Hexadecimal value Decimal value (LOWORD)
VFW_E_INVALIDMEDIATYPE The specified media type is invalid. 0x80040200 512
VFW_E_INVALIDSUBTYPE The specified media subtype is invalid. 0x80040201 513
VFW_E_NEED_OWNER This object can only be created as an aggregated object. 0x80040202 514
VFW_E_ENUM_OUT_OF_SYNC The state of the enumerated object has changed and is now inconsistent with the state of the enumerator. Discard any data obtained from previous calls to the enumerator and then update the enumerator by calling the enumerator's Reset method. 0x80040203 515
VFW_E_ALREADY_CONNECTED At least one of the pins involved in the operation is already connected. 0x80040204 516
VFW_E_FILTER_ACTIVE This operation cannot be performed because the filter is active. 0x80040205 517
VFW_E_NO_TYPES One of the specified pins supports no media types. 0x80040206 518
VFW_E_NO_ACCEPTABLE_TYPES There is no common media type between these pins. 0x80040207 519
VFW_E_INVALID_DIRECTION Two pins of the same direction cannot be connected. 0x80040208 520
VFW_E_NOT_CONNECTED The operation cannot be performed because the pins are not connected. 0x80040209 521
VFW_E_NO_ALLOCATOR No sample buffer allocator is available. 0x8004020A 522
VFW_E_RUNTIME_ERROR A run-time error occurred. 0x8004020B 523
VFW_E_BUFFER_NOTSET No buffer space has been set. 0x8004020C 524
VFW_E_BUFFER_OVERFLOW The buffer is not big enough. 0x8004020D 525
VFW_E_BADALIGN An invalid alignment was specified. 0x8004020E 526
VFW_E_ALREADY_COMMITTED Cannot change allocated memory while the filter is active. 0x8004020F 527
VFW_E_BUFFERS_OUTSTANDING One or more buffers are still active. 0x80040210 528
VFW_E_NOT_COMMITTED Cannot allocate a sample when the allocator is not active. 0x80040211 529
VFW_E_SIZENOTSET Cannot allocate memory because no size has been set. 0x80040212 530
VFW_E_NO_CLOCK Cannot lock for synchronization because no clock has been defined. 0x80040213 531
VFW_E_NO_SINK Quality messages could not be sent because no quality sink has been defined. 0x80040214 532
VFW_E_NO_INTERFACE A required interface has not been implemented. 0x80040215 533
VFW_E_NOT_FOUND An object or name was not found. 0x80040216 534
VFW_E_CANNOT_CONNECT No combination of intermediate filters could be found to make the connection. 0x80040217 535
VFW_E_CANNOT_RENDER No combination of filters could be found to render the stream. 0x80040218 536
VFW_E_CHANGING_FORMAT Could not change formats dynamically. 0x80040219 537
VFW_E_NO_COLOR_KEY_SET No color key has been set. 0x8004021A 538
VFW_E_NOT_OVERLAY_CONNECTION Current pin connection is not using the IOverlay transport. 0x8004021B 539
VFW_E_NOT_SAMPLE_CONNECTION Current pin connection is not using the IMemInputPin transport. 0x8004021C 540
VFW_E_PALETTE_SET Setting a color key would conflict with the palette already set. 0x8004021D 541
VFW_E_COLOR_KEY_SET Setting a palette would conflict with the color key already set. 0x8004021E 542
VFW_E_NO_COLOR_KEY_FOUND No matching color key is available. 0x8004021F 543
VFW_E_NO_PALETTE_AVAILABLE No palette is available. 0x80040220 544
VFW_E_NO_DISPLAY_PALETTE Display does not use a palette. 0x80040221 545
VFW_E_TOO_MANY_COLORS Too many colors for the current display settings. 0x80040222 546
VFW_E_STATE_CHANGED The state changed while waiting to process the sample. 0x80040223 547
VFW_E_NOT_STOPPED The operation could not be performed because the filter is not stopped. 0x80040224 548
VFW_E_NOT_PAUSED The operation could not be performed because the filter is not paused. 0x80040225 549
VFW_E_NOT_RUNNING The operation could not be performed because the filter is not running. 0x80040226 550
VFW_E_WRONG_STATE The operation could not be performed because the filter is in the wrong state. 0x80040227 551
VFW_E_START_TIME_AFTER_END The sample start time is after the sample end time. 0x80040228 552
VFW_E_INVALID_RECT The supplied rectangle is invalid. 0x80040229 553
VFW_E_TYPE_NOT_ACCEPTED This pin cannot use the supplied media type. 0x8004022A 554
VFW_E_SAMPLE_REJECTED This sample cannot be rendered. 0x8004022B 555
VFW_E_SAMPLE_REJECTED_EOS This sample cannot be rendered because the end of the stream has been reached. 0x8004022C 556
VFW_E_DUPLICATE_NAME An attempt to add a filter with a duplicate name failed. 0x8004022D 557
VFW_S_DUPLICATE_NAME An attempt to add a filter with a duplicate name succeeded with a modified name. 0x0004022D 557
VFW_E_TIMEOUT A time-out has expired. 0x8004022E 558
VFW_E_INVALID_FILE_FORMAT The file format is invalid. 0x8004022F 559
VFW_E_ENUM_OUT_OF_RANGE The list has already been exhausted. 0x80040230 560
VFW_E_CIRCULAR_GRAPH The filter graph is circular. 0x80040231 561
VFW_E_NOT_ALLOWED_TO_SAVE Updates are not allowed in this state. 0x80040232 562
VFW_E_TIME_ALREADY_PASSED An attempt was made to queue a command for a time in the past. 0x80040233 563
VFW_E_ALREADY_CANCELLED The queued command was already canceled. 0x80040234 564
VFW_E_CORRUPT_GRAPH_FILE Cannot render the file because it is corrupt. 0x80040235 565
VFW_E_ADVISE_ALREADY_SET An IOverlay advise link already exists. 0x80040236 566
VFW_S_STATE_INTERMEDIATE The state transition is not complete. 0x00040237 567
VFW_E_NO_MODEX_AVAILABLE No full-screen modes are available. 0x80040238 568
VFW_E_NO_ADVISE_SET This advise cannot be canceled because it was not successfully set. 0x80040239 569
VFW_E_NO_FULLSCREEN Full-screen mode is not available. 0x8004023A 570
VFW_E_IN_FULLSCREEN_MODE Cannot call IVideoWindow methods while in full-screen mode. 0x8004023B 571
VFW_E_UNKNOWN_FILE_TYPE The media type of this file is not recognized. 0x80040240 576
VFW_E_CANNOT_LOAD_SOURCE_FILTER The source filter for this file could not be loaded. 0x80040241 577
VFW_S_PARTIAL_RENDER Some of the streams in this movie are in an unsupported format. 0x00040242 578
VFW_E_FILE_TOO_SHORT A file appeared to be incomplete. 0x80040243 579
VFW_E_INVALID_FILE_VERSION The file's version number is invalid. 0x80040244 580
VFW_S_SOME_DATA_IGNORED The file contained some property settings that were not used. 0x00040245 581
VFW_S_CONNECTIONS_DEFERRED Some connections failed and were deferred. 0x00040246 582
VFW_E_INVALID_CLSID This file is corrupt: it contains an invalid class identifier. 0x80040247 583
VFW_E_INVALID_MEDIA_TYPE This file is corrupt: it contains an invalid media type. 0x80040248 584
VFW_E_SAMPLE_TIME_NOT_SET No time stamp has been set for this sample. 0x80040249 585
VFW_S_RESOURCE_NOT_NEEDED The resource specified is no longer needed. 0x00040250 592
VFW_E_MEDIA_TIME_NOT_SET No media time was set for this sample. 0x80040251 593
VFW_E_NO_TIME_FORMAT_SET No media time format was selected. 0x80040252 594
VFW_E_MONO_AUDIO_HW Cannot change balance because audio device is monoaural only. 0x80040253 595
VFW_S_MEDIA_TYPE_IGNORED Could not connect with the media type in the persistent graph. 0x00040254 596
VFW_E_NO_DECOMPRESSOR Cannot play back the video stream: could not find a suitable decompressor. 0x80040255 597
VFW_E_NO_AUDIO_HARDWARE Cannot play back the audio stream: no audio hardware is available, or the hardware is not supported. 0x80040256 598
VFW_S_VIDEO_NOT_RENDERED Cannot play back the video stream: could not find a suitable renderer. 0x00040257 599
VFW_S_AUDIO_NOT_RENDERED Cannot play back the audio stream: could not find a suitable renderer. 0x00040258 600
VFW_E_RPZA Cannot play back the video stream: format 'RPZA' is not supported. 0x80040259 601
VFW_S_RPZA Cannot play back the video stream: format 'RPZA' is not supported. 0x0004025A 602
VFW_E_PROCESSOR_NOT_SUITABLE DirectShow cannot play MPEG movies on this processor. 0x8004025B 603
VFW_E_UNSUPPORTED_AUDIO Cannot play back the audio stream: the audio format is not supported. 0x8004025C 604
VFW_E_UNSUPPORTED_VIDEO Cannot play back the video stream: the video format is not supported. 0x8004025D 605
VFW_E_MPEG_NOT_CONSTRAINED DirectShow cannot play this video stream because it falls outside the constrained standard. 0x8004025E 606
VFW_E_NOT_IN_GRAPH Cannot perform the requested function on an object that is not in the filter graph. 0x8004025F 607
VFW_S_ESTIMATED The value returned had to be estimated. Its accuracy can't be guaranteed. 0x00040260 608
VFW_E_NO_TIME_FORMAT Cannot access the time format on an object. 0x80040261 609
VFW_E_READ_ONLY Could not make the connection because the stream is read-only and the filter alters the data. 0x80040262 610
VFW_S_RESERVED This success code is reserved for internal purposes within DirectShow. 0x00040263 611
VFW_E_BUFFER_UNDERFLOW The buffer is not full enough. 0x80040264 612
VFW_E_UNSUPPORTED_STREAM Cannot play back the file: the format is not supported. 0x80040265 613
VFW_E_NO_TRANSPORT Pins cannot connect because they don't support the same transport. 0x80040266 614
VFW_S_STREAM_OFF The stream was turned off. 0x00040267 615
VFW_S_CANT_CUE The filter is active, but cannot deliver data. See IMediaFilter::GetState. 0x00040268 616
VFW_E_BAD_VIDEOCD The Video CD can't be read correctly by the device or the data is corrupt. 0x80040269 617
VFW_S_NO_STOP_TIME The sample had a start time but not a stop time. In this case, the stop time that is returned is set to the start time plus one. 0x80040270 624
VFW_E_OUT_OF_VIDEO_MEMORY There is not enough video memory at this display resolution and number of colors. Reducing resolution might help. 0x80040271 625
VFW_E_VP_NEGOTIATION_FAILED The video port connection negotiation process has failed. 0x80040272 626
VFW_E_DDRAW_CAPS_NOT_SUITABLE Either Microsoft® DirectDraw® has not been installed or the video card capabilities are not suitable. Make sure the display is not in 16-color mode. 0x80040273 627
VFW_E_NO_VP_HARDWARE No video port hardware is available, or the hardware is not responding. 0x80040274 628
VFW_E_NO_CAPTURE_HARDWARE No capture hardware is available, or the hardware is not responding. 0x80040275 629
VFW_E_DVD_OPERATION_INHIBITED This user operation is inhibited by DVD content at this time. 0x80040276 630
VFW_E_DVD_INVALIDDOMAIN This operation is not permitted in the current domain. 0x80040277 631
VFW_E_DVD_NO_BUTTON Requested button is not available. 0x80040278 632
VFW_E_DVD_GRAPHNOTREADY DVD-Video playback graph has not been built yet. 0x80040279 633
VFW_E_DVD_RENDERFAIL DVD-Video playback graph building failed. 0x8004027A 634
VFW_E_DVD_DECNOTENOUGH DVD-Video playback graph could not be built due to insufficient decoders. 0x8004027B 635
VFW_E_DVD_NOT_IN_KARAOKE_MODE The DVD Navigator is not in karaoke mode. 0x8004028B 651
VFW_E_FRAME_STEP_UNSUPPORTED Frame stepping is not supported. 0x8004028E 654
VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD Pin is already blocked on the calling thread. 0x80040293 659
VFW_E_PIN_ALREADY_BLOCKED Pin is already blocked on another thread. 0x80040294 660
VFW_E_CERTIFICATION_FAILURE Use of this filter is restricted by a software key. The application must unlock the filter. 0x80040295 661
VFW_E_BAD_KEY A registry entry is corrupt. 0x800403F2 1010

HRESULT Values Specific to DirectShow Editing Services

In addition to the values listed previously, DirectShow Editing Services defines the following HRESULT values.

Return code Description Hexadecimal value Decimal value (LOWORD)
S_WARN_OUTPUTRESET The rendering portion of the graph was deleted. The application must rebuild it. 0x00009DD4 40404
E_NOTINTREE The object is not contained in the timeline. 0x80040400 1024
E_RENDER_ENGINE_IS_BROKEN Operation failed because project was not rendered successfully. 0x80040401 1025
E_MUST_INIT_RENDERER Render engine has not been initialized. 0x80040402 1026
E_NOTDETERMINED Cannot determine requested value. 0x80040403 1027
E_NO_TIMELINE There is no timeline object. 0x80040404 1028