| Previous | Next |
| IMAPI_E_FSI_INTERNAL_ERROR | IMAPI_E_READONLY |
IMAPI_E_INVALID_PARAM
IMAPI_E_INVALID_PARAM is a parameter-validation failure used by several IMAPI2FS methods. The correct interpretation depends on the operation: AddFile validates its path and stream arguments, put_WorkingDirectory validates the directory string, and file-system configuration methods validate enumerations or combinations of flags. The error is therefore more specific than a generic COM failure but not self-identifying without the method name.
Log the method and offending argument before normalizing input
- Preserve the exact parameter value, including empty strings, flag combinations, and numeric limits.
- Compare the argument with the documented type and valid enumeration values for the method that returned the HRESULT.
- Avoid immediately replacing the value with a default; doing so destroys the evidence needed to find the caller bug.
A frequent diagnostic mistake is to search only the error text and ignore the API that produced it. The same HRESULT can be returned by directory, import, working-directory, and other image APIs for different contract violations. Start from the call site, then validate only the parameters that belong to that call. If the failing value was derived from user input, record the pre-conversion value as well as the final COM value.
AddFile · WorkingDirectory · IFileSystemImage
Looking for a different code? Search another status or error code.