| Предыдущий | Следующий |
| VFW_E_CANNOT_LOAD_SOURCE_FILTER | VFW_E_INVALID_FILE_VERSION |
VFW_E_FILE_TOO_SHORT
Практический смысл
VFW_E_FILE_TOO_SHORT (0X80040243) — результат DirectShow. Исходное описание: AllStat records its meaning as “A file appeared to be incomplete”.
. Здесь требуется проверка конкретной границы DirectShow, а не общий поиск отсутствующего codec или filter.
Конкретные признаки контракта
- Evidence to collect
Capture 1 for this result: actual file length and expected minimum structure.
- Evidence to collect
Capture 2 for this result: transfer completion status and content-length metadata.
- Evidence to collect
Capture 3 for this result: parser read offset at end-of-file.
- Correction and retry boundary
Corrective action 3 for this result: use atomic publish semantics so readers do not see partial media.
- Correction and retry boundary
Corrective action 2 for this result: wait for producer finalization when consuming growing output.
- Likely causes
Possible cause 3 for this result: a live-growing file is opened before required structures are written.
- Difference from nearby HRESULTs
VFW_E_INVALID_FILE_FORMAT can describe malformed complete data, while it specifically indicates insufficient file length. Keep these outcomes separate in logs, exception mappings, user messages, dashboards and automated retry policy.
Что проверить в trace
Сохраните exact method, filter CLSID/friendly name, connected pins, media type, graph state и generation, clock/rate либо sample timestamps, если они участвуют в этой операции. Для persisted data дополнительно фиксируйте offending field или byte range, а для renderer/device path — выбранный hardware capability.
Как отделить этот случай от соседних
Сопоставьте каждый приведённый выше признак с фактическим вызовом. Если условие из исходного контракта не выполняется, не переносите recovery от другого VFW-кода. Если после rebuild или re-enumeration результат исчезает, отдельно проверьте stale object, race и изменение topology.
Исправление и подтверждение
Меняйте только подтверждённую причину: входной параметр, media type, timing, filter connection, renderer/device capability, persisted field или текущее состояние graph. После изменения повторите тот же минимальный сценарий и сравните topology и первый HRESULT до и после исправления.
Технические ссылки
- Microsoft: DirectShow error and success codes.
- Microsoft: IGraphBuilder::RenderFile.
- Microsoft: DirectShow graph building.
Нужно найти другой код? Найти другой код состояния или ошибки.
