Поделиться через


Error and Success Codes (Windows Embedded CE 6.0)

1/6/2010

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 for the Microsoft Windows SDK contains more information, including how to use the FAILED and SUCCEEDED macros to test return values. It also contains information on the structure of COM error codes.

The following table shows some of the typical COM error and success codes that DirectShow returns.

Value Description

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_ (Control Error Codes) pertain specifically to the Microsoft Windows Media Player 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/98 errors. For example, Microsoft Visual C++® users can find COM or Windows 95/98 errors in the Winerror.h include file.

C/C++ programmers receive error codes in complete (32-bit) hexadecimal format.

Microsoft Visual Basic® programmers 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, convert the decimal number to its hexadecimal equivalent and look for the error as described previously.

The error's hexadecimal version is a maximum of four digits.

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 Decimal

CTL_E_ILLEGALFUNCTIONCALL

The syntax in the function call was incorrect.

0x800A0005

5

CTL_E_OVERFLOW

The result is too large to be represented in function's return type.

0x800A0006

6

CTL_E_OUTOFMEMORY

There is insufficient memory to perform the requested operation.

0x800A0007

7

CTL_E_DIVISIONBYZERO

The function attempted to divide by zero.

0x800A000B

11

CTL_E_OUTOFSTRINGSPACE

There is insufficient string space to perform the requested operation. Certain operations (copying, for example) involve temporary strings that use up string space.

0x800A000E

14

CTL_E_OUTOFSTACKSPACE

There is insufficient string space to perform the requested operation.

Each thread has its own stack while other resources, such as heap memory, are shared by all threads in the process.

You must specify how much memory to allocate for a separate stack for each additional thread your program needs.

The operating system will allocate additional stack space for the thread, if necessary, but you must specify a default value.

If the operating system cannot allocate the necessary space, you receive this error.

0x800A001C

28

CTL_E_BADFILENAMEORNUMBER

The function attempted to access a file with a bad file name or number.

0x800A0034

52

CTL_E_FILENOTFOUND

The function attempted to access a file that could not be found.

0x800A0035

53

CTL_E_BADFILEMODE

The function attempted to perform an operation on a file that has an incompatible file mode. File modes are Append, Binary, Input, Output, or Random.

0x800A0036

54

CTL_E_FILEALREADYOPEN

The function attempted to open a file that was already open.

0x800A0037

55

CTL_E_DEVICEIOERROR

There was a device I/O error during the function execution.

0x800A0039

57

CTL_E_FILEALREADYEXISTS

The function attempted to create a file that already exists.

0x800A003A

58

CTL_E_BADRECORDLENGTH

The function attempted to access a file record that is incorrect.

For example, it is assumed that a file opened for random access is composed of a set of identical-length records.

0x800A003B

59

CTL_E_DISKFULL

The function attempted to write to the disk, but the disk is full.

0x800A003D

61

CTL_E_BADRECORDNUMBER

The function attempted to access a file record that is incorrect.

The record number is the position of the position in a recordset (a set of records in a data source).

0x800A003F

63

CTL_E_BADFILENAME

The function attempted to access a file name that is incorrect.

0x800A0040

64

CTL_E_TOOMANYFILES

The function attempted to open a file when too many files were already open.

0x800A0043

67

CTL_E_DEVICEUNAVAILABLE

The function attempted to access a device that was not available.

0x800A0044

68

CTL_E_PERMISSIONDENIED

The function attempted to access a file without the proper permission setting.

0x800A0046

70

CTL_E_DISKNOTREADY

The function attempted to access a file when the disk was not ready.

0x800A0047

71

CTL_E_PATHFILEACCESSERROR

The function attempted to access a file or path that was incorrect or had the wrong permissions.

0x800A004B

75

CTL_E_PATHNOTFOUND

The function attempted to access a file with an incorrect path.

0x800A004C

76

CTL_E_INVALIDPATTERNSTRING

The function was called with an invalid string.

0x800A005D

93

CTL_E_INVALIDUSEOFNULL

The function was called with an invalid NULL.

0x800A005E

94

VFW_S_NO_MORE_ITEMS

There are no more items in the list.

0x00040103

259

CTL_E_INVALIDFILEFORMAT

The function attempted to perform an operation on a file that has an incompatible file format.

0x800A0141

321

CTL_E_INVALIDPROPERTYVALUE

The function was called with an invalid property value.

0x800A017C

380

CTL_E_INVALIDPROPERTYARRAYINDEX

The function was called with an invalid property array index.

0x800A017D

381

CTL_E_SETNOTSUPPORTEDATRUNTIME

The function attempted to set a property that cannot be set at run time.

0x800A017E

382

CTL_E_SETNOTSUPPORTED

The function attempted to set a property that cannot be set.

0x800A017F

383

CTL_E_NEEDPROPERTYARRAYINDEX

The function attempted to access a property that needs an array index without the array index.

0x800A0181

385

CTL_E_SETNOTPERMITTED

The function attempted to set a property without the proper permissions to set the property.

0x800A0183

387

CTL_E_GETNOTSUPPORTEDATRUNTIME

The function attempted to get a property that cannot be retrieved at run time.

0x800A0189

393

CTL_E_GETNOTSUPPORTED

The function attempted to get a property that cannot be retrieved.

0x800A018A

394

CTL_E_PROPERTYNOTFOUND

The function attempted to get a property that could not be found.

0x800A01A6

422

CTL_E_INVALIDCLIPBOARDFORMAT

The function attempted an operation with an invalid Clipboard format.

0x800A01CC

460

CTL_E_INVALIDPICTURE

The function attempted an operation with an invalid picture.

0x800A01E1

481

CTL_E_PRINTERERROR

The function attempted to print, and there was a printer error.

0x800A01E2

482

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 enumerator has become invalid.

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 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_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_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 stamp 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 monaural 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 cannot 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 do not support the same transport.

0x80040266

614

VFW_S_STREAM_OFF

The stream was turned off.

0x00040267

615

VFW_S_CANT_CUE

The graph cannot be cued because it lacks data or contains corrupt data.

0x00040268

616

VFW_E_BAD_VIDEOCD

The Video CD cannot be read correctly by the device or is 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 returned is set to the start time plus one.

The IMediaSample::GetTime method can return this success code.

0x80040270

618

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

619

VFW_E_VP_NEGOTIATION_FAILED

The video port connection negotiation process has failed.

0x80040272

620

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

621

VFW_E_NO_VP_HARDWARE

No video port hardware is available, or the hardware is not responding.

0x80040274

622

VFW_E_NO_CAPTURE_HARDWARE

No capture hardware is available, or the hardware is not responding.

0x80040275

623

VFW_E_DVD_OPERATION_INHIBITED

Not supported in Windows Embedded CE.

0x80040276

624

VFW_E_DVD_INVALIDDOMAIN

Not supported in Windows Embedded CE.

0x80040277

625

VFW_E_DVD_NO_BUTTON

Not supported in Windows Embedded CE.

0x80040278

626

VFW_E_DVD_GRAPHNOTREADY

Not supported in Windows Embedded CE.

0x80040279

627

VFW_E_DVD_RENDERFAIL

Not supported in Windows Embedded CE.

0x8004027a

628

VFW_E_DVD_DECNOTENOUGH

Not supported in Windows Embedded CE.

0x8004027b

629

CTL_E_CANTSAVEFILETOTEMP

The file cannot be saved to the TEMP directory.

0x800A02DF

735

CTL_E_SEARCHTEXTNOTFOUND

The searched-for text cannot be found.

0x800A02E8

744

CTL_E_REPLACEMENTSTOOLONG

The text replacement is too long.

0x800A02EA

746

VFW_E_BAD_KEY

A registry entry is corrupt.

0x800403F2

1010

See Also

Reference

DirectShow Macros