What does Windows error code 117 (ERROR_INVALID_CATEGORY) mean?

 
Could be also:
ConstantTypeOS
EUCLEANerrnoLinux
ENETRESETerrnoWindows
CANNOT_WRITE_CONFIGURATIONBugCheck CodeWindows
Previous Next
ERROR_INVALID_TARGET_HANDLE ERROR_INVALID_VERIFY_SWITCH

ERROR_INVALID_CATEGORY

What ERROR_INVALID_CATEGORY means

ERROR_INVALID_CATEGORY is a Win32 system result whose documented message is: “The IOCTL call made by the application program is not correct.” In practical troubleshooting, it belongs to legacy device-control calls where an application supplied an IOCTL category that the target driver or compatibility layer does not recognize. For ERROR_INVALID_CATEGORY, the numeric result identifies the failed contract, while the operation and target object explain why this particular result appeared.

Typical causes

  • the request was sent to the wrong device type
  • the application used a DOS or OS/2 IOCTL category unsupported by the current host
  • the category and function number were encoded for a different driver version

How to investigate ERROR_INVALID_CATEGORY

  1. log the device path, category, function, input length, and caller architecture
  2. verify the handle was opened for the intended device class
  3. compare the request definition with the installed driver headers

When investigating ERROR_INVALID_CATEGORY, start with the first failing call rather than a later cleanup error. Preserve the raw ERROR_INVALID_CATEGORY result before any wrapper converts it. Record whether ERROR_INVALID_CATEGORY is reproducible in a clean process, a new user session, or after the relevant object is recreated.

Developer guidance

Use typed control-code definitions from the matching SDK and validate device identity before issuing the request. Avoid hard-coded numeric categories copied from another platform. For ERROR_INVALID_CATEGORY, logs should include the operation name, canonical target, process architecture, operating-system build, and the state that was validated immediately before the call. For ERROR_INVALID_CATEGORY, avoid blind retries while the same precondition remains unchanged.

Administrator and support guidance

Check that the intended driver is installed and that device redirection did not replace the target with a generic device. Driver reinstall alone will not fix a caller using the wrong category. Before restarting after ERROR_INVALID_CATEGORY, collect evidence because a restart may clear the state responsible for this result. When a ERROR_INVALID_CATEGORY workaround succeeds, record exactly which process, mapping, media, driver, or configuration value changed.

Example incident

A diagnostic utility opens a printer device but sends a disk-oriented legacy IOCTL category, which the device stack rejects with ERROR_INVALID_CATEGORY. A useful ERROR_INVALID_CATEGORY incident timeline shows the successful setup steps, the first operation returning ERROR_INVALID_CATEGORY, and any secondary errors produced during its rollback.

How it differs from related results

ERROR_INVALID_FUNCTION may mean the function is unsupported generally; ERROR_INVALID_CATEGORY points specifically to the category portion of a legacy IOCTL contract. For ERROR_INVALID_CATEGORY, that distinction determines whether the remedy belongs in application input, resource release, mapping topology, driver compatibility, or underlying storage.

Evidence worth collecting

For this result, capture evidence around the condition “the request was sent to the wrong device type.” The ERROR_INVALID_CATEGORY evidence package should include the exact API or command, all non-secret input fields, normalized paths or device names, object ownership, and a timestamp correlatable with Windows Event Log and application tracing. The first concrete ERROR_INVALID_CATEGORY check should be to log the device path, category, function, input length, and caller architecture.

Recovery and verification

Recovery from ERROR_INVALID_CATEGORY is complete only when the original operation succeeds under the same relevant conditions. After fixing ERROR_INVALID_CATEGORY, repeat the action and verify that no stale mapping or handle remains. Run the operation a second time to confirm that the setup and cleanup associated with ERROR_INVALID_CATEGORY are idempotent. If ERROR_INVALID_CATEGORY disappears only after reboot, continue investigating the owner or leaked state rather than treating reboot as the permanent correction.

When to escalate

Escalate ERROR_INVALID_CATEGORY with a minimal reproduction, the exact ERROR_INVALID_CATEGORY value, application and component versions, target path or device class, and the collected state before and after this failure. For a legacy ERROR_INVALID_CATEGORY case, also state whether the executable is 16-bit, DOS-derived, virtualized, redirected, or running under a compatibility subsystem.

References


Looking for a different code? Search another status or error code.