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.

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_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.

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 while those beginning with CTL_ pertain specifically to the ActiveMovie™ Control. This table does not contain all possible return values; the return codes shown apply specifically to DirectShow. DirectShow-specific return codes also appear in Vfwmsgs.h in the DirectShow SDK Include directory. If you encounter an error not listed here, the error code might appear in another source, such as a list of COM or Windows® 95 errors. For example, Microsoft Visual C++® users can find COM or Windows 95 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 Hexadecimal Value Decimal Value
CTL_E_ILLEGALFUNCTIONCALL 0x800A0005 5
CTL_E_OVERFLOW 0x800A0006 6
CTL_E_OUTOFMEMORY 0x800A0007 7
CTL_E_DIVISIONBYZERO 0x800A000B 11
CTL_E_OUTOFSTRINGSPACE 0x800A000E 14
CTL_E_OUTOFSTACKSPACE 0x800A001C 28
CTL_E_BADFILENAMEORNUMBER 0x800A0034 52
CTL_E_FILENOTFOUND 0x800A0035 53
CTL_E_BADFILEMODE 0x800A0036 54
CTL_E_FILEALREADYOPEN 0x800A0037 55
CTL_E_DEVICEIOERROR 0x800A0039 57
CTL_E_FILEALREADYEXISTS 0x800A003A 58
CTL_E_BADRECORDLENGTH 0x800A003B 59
CTL_E_DISKFULL 0x800A003D 61
CTL_E_BADRECORDNUMBER 0x800A003F 63
CTL_E_BADFILENAME 0x800A0040 64
CTL_E_TOOMANYFILES 0x800A0043 67
CTL_E_DEVICEUNAVAILABLE 0x800A0044 68
CTL_E_PERMISSIONDENIED 0x800A0046 70
CTL_E_DISKNOTREADY 0x800A0047 71
CTL_E_PATHFILEACCESSERROR 0x800A004B 75
CTL_E_PATHNOTFOUND 0x800A004C 76
CTL_E_INVALIDPATTERNSTRING 0x800A005D 93
CTL_E_INVALIDUSEOFNULL 0x800A005E 94
VFW_S_NO_MORE_ITEMS 0x00040103 259
    There are no more items in the list.
CTL_E_INVALIDFILEFORMAT 0x800A0141 321
CTL_E_INVALIDPROPERTYVALUE 0x800A017C 380
CTL_E_INVALIDPROPERTYARRAYINDEX 0x800A017D 381
CTL_E_SETNOTSUPPORTEDATRUNTIME 0x800A017E 382
CTL_E_SETNOTSUPPORTED 0x800A017F 383
CTL_E_NEEDPROPERTYARRAYINDEX 0x800A0181 385
CTL_E_SETNOTPERMITTED 0x800A0183 387
CTL_E_GETNOTSUPPORTEDATRUNTIME 0x800A0189 393
CTL_E_GETNOTSUPPORTED 0x800A018A 394
CTL_E_PROPERTYNOTFOUND 0x800A01A6 422
CTL_E_INVALIDCLIPBOARDFORMAT 0x800A01CC 460
CTL_E_INVALIDPICTURE 0x800A01E1 481
CTL_E_PRINTERERROR 0x800A01E2 482
VFW_E_INVALIDMEDIATYPE 0x80040200 512
    The specified media type is invalid.
VFW_E_INVALIDSUBTYPE 0x80040201 513
    The specified media subtype is invalid.
VFW_E_NEED_OWNER 0x80040202 514
    This object can only be created as an aggregated object.
VFW_E_ENUM_OUT_OF_SYNC 0x80040203 515
    The enumerator has become invalid.
VFW_E_ALREADY_CONNECTED 0x80040204 516
    At least one of the pins involved in the operation is already connected.
VFW_E_FILTER_ACTIVE 0x80040205 517
    This operation cannot be performed because the filter is active.
VFW_E_NO_TYPES 0x80040206 518
    One of the specified pins supports no media types.
VFW_E_NO_ACCEPTABLE_TYPES 0x80040207 519
    There is no common media type between these pins.
VFW_E_INVALID_DIRECTION 0x80040208 520
    Two pins of the same direction cannot be connected.
VFW_E_NOT_CONNECTED 0x80040209 521
    The operation cannot be performed because the pins are not connected.
VFW_E_NO_ALLOCATOR 0x8004020A 522
    No sample buffer allocator is available.
VFW_E_RUNTIME_ERROR 0x8004020B 523
    A run-time error occurred.
VFW_E_BUFFER_NOTSET 0x8004020C 524
    No buffer space has been set.
VFW_E_BUFFER_OVERFLOW 0x8004020D 525
    The buffer is not big enough.
VFW_E_BADALIGN 0x8004020E 526
    An invalid alignment was specified.
VFW_E_ALREADY_COMMITTED 0x8004020F 527
    Cannot change allocated memory while the filter is active.
VFW_E_BUFFERS_OUTSTANDING 0x80040210 528
    One or more buffers are still active.
VFW_E_NOT_COMMITTED 0x80040211 529
    Cannot allocate a sample when the allocator is not active.
VFW_E_SIZENOTSET 0x80040212 530
    Cannot allocate memory because no size has been set.
VFW_E_NO_CLOCK 0x80040213 531
    Cannot lock for synchronization because no clock has been defined.
VFW_E_NO_SINK 0x80040214 532
    Quality messages could not be sent because no quality sink has been defined.
VFW_E_NO_INTERFACE 0x80040215 533
    A required interface has not been implemented.
VFW_E_NOT_FOUND 0x80040216 534
    An object or name was not found.
VFW_E_CANNOT_CONNECT 0x80040217 535
    No combination of intermediate filters could be found to make the connection.
VFW_E_CANNOT_RENDER 0x80040218 536
    No combination of filters could be found to render the stream.
VFW_E_CHANGING_FORMAT 0x80040219 537
    Could not change formats dynamically.
VFW_E_NO_COLOR_KEY_SET 0x8004021A 538
    No color key has been set.
VFW_E_NOT_OVERLAY_CONNECTION 0x8004021B 539
    Current pin connection is not using the IOverlay transport.
VFW_E_NOT_SAMPLE_CONNECTION 0x8004021C 540
    Current pin connection is not using the IMemInputPin transport.
VFW_E_PALETTE_SET 0x8004021D 541
    Setting a color key would conflict with the palette already set.
VFW_E_COLOR_KEY_SET 0x8004021E 542
    Setting a palette would conflict with the color key already set.
VFW_E_NO_COLOR_KEY_FOUND 0x8004021F 543
    No matching color key is available.
VFW_E_NO_PALETTE_AVAILABLE 0x80040220 544
    No palette is available.
VFW_E_NO_DISPLAY_PALETTE 0x80040221 545
    Display does not use a palette.
VFW_E_TOO_MANY_COLORS 0x80040222 546
    Too many colors for the current display settings.
VFW_E_STATE_CHANGED 0x80040223 547
    The state changed while waiting to process the sample.
VFW_E_NOT_STOPPED 0x80040224 548
    The operation could not be performed because the filter is not stopped.
VFW_E_NOT_PAUSED 0x80040225 549
    The operation could not be performed because the filter is not paused.
VFW_E_NOT_RUNNING 0x80040226 550
    The operation could not be performed because the filter is not running.
VFW_E_WRONG_STATE 0x80040227 551
    The operation could not be performed because the filter is in the wrong state.
VFW_E_START_TIME_AFTER_END 0x80040228 552
    The sample start time is after the sample end time.
VFW_E_INVALID_RECT 0x80040229 553
    The supplied rectangle is invalid.
VFW_E_TYPE_NOT_ACCEPTED 0x8004022A 554
    This pin cannot use the supplied media type.
VFW_E_SAMPLE_REJECTED 0x8004022B 555
    This sample cannot be rendered.
VFW_E_SAMPLE_REJECTED_EOS 0x8004022C 556
    This sample cannot be rendered because the end of the stream has been reached.
VFW_E_DUPLICATE_NAME 0x8004022D 557
    An attempt to add a filter with a duplicate name failed.
VFW_S_DUPLICATE_NAME 0x0004022D 557
    An attempt to add a filter with a duplicate name succeeded with a modified name.
VFW_E_TIMEOUT 0x8004022E 558
    A time-out has expired.
VFW_E_INVALID_FILE_FORMAT 0x8004022F 559
    The file format is invalid.
VFW_E_ENUM_OUT_OF_RANGE 0x80040230 560
    The list has already been exhausted.
VFW_E_CIRCULAR_GRAPH 0x80040231 561
    The filter graph is circular.
VFW_E_NOT_ALLOWED_TO_SAVE 0x80040232 562
    Updates are not allowed in this state.
VFW_E_TIME_ALREADY_PASSED 0x80040233 563
    An attempt was made to queue a command for a time in the past.
VFW_E_ALREADY_CANCELLED 0x80040234 564
    The queued command was already canceled.
VFW_E_CORRUPT_GRAPH_FILE 0x80040235 565
    Cannot render the file because it is corrupt.
VFW_E_ADVISE_ALREADY_SET 0x80040236 566
    An IOverlay advise link already exists.
VFW_S_STATE_INTERMEDIATE 0x00040237 567
    The state transition is not complete.
VFW_E_NO_MODEX_AVAILABLE 0x80040238 568
    No full-screen modes are available.
VFW_E_NO_ADVISE_SET 0x80040239 569
    This advise cannot be canceled because it was not successfully set.
VFW_E_NO_FULLSCREEN 0x8004023A 570
    Full-screen mode is not available.
VFW_E_IN_FULLSCREEN_MODE 0x8004023B 571
    Cannot call IVideoWindow methods while in full-screen mode.
VFW_E_UNKNOWN_FILE_TYPE 0x80040240 576
    The media type of this file is not recognized.
VFW_E_CANNOT_LOAD_SOURCE_FILTER 0x80040241 577
    The source filter for this file could not be loaded.
VFW_S_PARTIAL_RENDER 0x00040242 578
    Some of the streams in this movie are in an unsupported format.
VFW_E_FILE_TOO_SHORT 0x80040243 579
    A file appeared to be incomplete.
VFW_E_INVALID_FILE_VERSION 0x80040244 580
    The file's version number is invalid.
VFW_S_SOME_DATA_IGNORED 0x00040245 581
    The file contained some property settings that were not used.
VFW_S_CONNECTIONS_DEFERRED 0x00040246 582
    Some connections failed and were deferred.
VFW_E_INVALID_CLSID 0x80040247 583
    This file is corrupt: it contains an invalid class identifier.
VFW_E_INVALID_MEDIA_TYPE 0x80040248 584
    This file is corrupt: it contains an invalid media type.
VFW_E_SAMPLE_TIME_NOT_SET 0x80040249 585
    No time stamp has been set for this sample.
VFW_S_RESOURCE_NOT_NEEDED 0x00040250 592
    The resource specified is no longer needed.
VFW_E_MEDIA_TIME_NOT_SET 0x80040251 593
    No media time stamp was set for this sample.
VFW_E_NO_TIME_FORMAT_SET 0x80040252 594
    No media time format was selected.
VFW_E_MONO_AUDIO_HW 0x80040253 595
    Cannot change balance because audio device is mono only.
VFW_S_MEDIA_TYPE_IGNORED 0x00040254 596
    Could not connect with the media type in the persistent graph.
VFW_E_NO_DECOMPRESSOR 0x80040255 597
    Cannot play back the video stream: could not find a suitable decompressor.
VFW_E_NO_AUDIO_HARDWARE 0x80040256 598
    Cannot play back the audio stream: no audio hardware is available, or the hardware is not supported.
VFW_S_VIDEO_NOT_RENDERED 0x00040257 599
    Cannot play back the video stream: could not find a suitable renderer.
VFW_S_AUDIO_NOT_RENDERED 0x00040258 600
    Cannot play back the audio stream: could not find a suitable renderer.
VFW_E_RPZA 0x80040259 601
    Cannot play back the video stream: format 'RPZA' is not supported.
VFW_S_RPZA 0x0004025A 602
    Cannot play back the video stream: format 'RPZA' is not supported.
VFW_E_PROCESSOR_NOT_SUITABLE 0x8004025B 603
    DirectShow cannot play MPEG movies on this processor.
VFW_E_UNSUPPORTED_AUDIO 0x8004025C 604
    Cannot play back the audio stream: the audio format is not supported.
VFW_E_UNSUPPORTED_VIDEO 0x8004025D 605
    Cannot play back the video stream: the video format is not supported.
VFW_E_MPEG_NOT_CONSTRAINED 0x8004025E 606
    DirectShow cannot play this video stream because it falls outside the constrained standard.
VFW_E_NOT_IN_GRAPH 0x8004025F 607
    Cannot perform the requested function on an object that is not in the filter graph.
VFW_S_ESTIMATED 0x00040260 608
    The value returned had to be estimated. Its accuracy can't be guaranteed.
VFW_E_NO_TIME_FORMAT 0x80040261 609
    Cannot get or set time-related information on an object that is using a time format of
VFW_E_READ_ONLY 0x80040262 610
    Could not make the connection because the stream is read-only and the filter alters the data.
VFW_S_RESERVED 0x00040263 611
    This success code is reserved for internal purposes within DirectShow.
VFW_E_BUFFER_UNDERFLOW 0x80040264 612
    The buffer is not full enough.
VFW_E_UNSUPPORTED_STREAM 0x80040265 613
    Cannot play back the file: the format is not supported.
VFW_E_NO_TRANSPORT 0x80040266 614
    Pins cannot connect because they don't support the same transport.
VFW_S_STREAM_OFF 0x00040267 615
    The stream was turned off.
VFW_S_CANT_CUE 0x00040268 616
    The graph can't be cued because it lacks data or contains corrupt data.
VFW_E_BAD_VIDEOCD 0x80040269 617
    The Video CD can't be read correctly by the device or is the data is corrupt.
VFW_S_NO_STOP_TIME 0x80040270 618
    The sample had a start time but not a stop time. In this case, the stop time returned is set to the start time plus one. The IMediaSample::GetTime method can return this success code.
VFW_E_OUT_OF_VIDEO_MEMORY 0x80040271 619
    There is not enough video memory at this display resolution and number of colors. Reducing resolution might help.
VFW_E_VP_NEGOTIATION_FAILED 0x80040272 620
    The video port connection negotiation process has failed.
VFW_E_DDRAW_CAPS_NOT_SUITABLE 0x80040273 621
    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.
VFW_E_NO_VP_HARDWARE 0x80040274 622
    No video port hardware is available, or the hardware is not responding.
CTL_E_CANTSAVEFILETOTEMP 0x800A02DF 735
CTL_E_SEARCHTEXTNOTFOUND 0x800A02E8 744
CTL_E_REPLACEMENTSTOOLONG 0x800A02EA 746
VFW_E_BAD_KEY 0x800403F2 1010
    A registry entry is corrupt.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.