| Previous | Next |
| STG_E_INVALIDFUNCTION | STG_E_PATHNOTFOUND |
STG_E_FILENOTFOUND
What the missing object may be
STG_E_FILENOTFOUND is returned by Structured Storage when the requested object cannot be found. The important question is which namespace was searched. At the file-system boundary, the missing item can be the compound file itself. Inside an already opened compound file, it can be a storage or stream requested by name. A compound file is a container with directory-like storages and byte-stream objects, so a valid outer document can still lack the internal stream that an application expects.
IStorage::OpenStorage documents this result for a named child storage that does not exist. Similar failures can occur after an application, add-in, or converter assumes that an optional stream was written by an earlier version of a product.
How to diagnose it
- Record whether the failure occurs while opening the outer file or while opening a named child storage/stream.
- For a file on disk, verify the resolved path and the account running the process; for an embedded object, inspect the storage tree instead of relying only on the filename.
- Compare a failing file with a known-good file produced by the same application and version.
- Treat optional streams as optional only when the format contract says so; do not silently substitute unrelated data.
References
- Microsoft: IStorage::OpenStorage
- Apache POI: listing compound-file contents
- libolecf format documentation
Looking for a different code? Search another status or error code.