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. 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 the result

  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 this result, start with the first failing call rather than a later cleanup error. Preserve the raw it before any wrapper converts it. Record whether it 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. Logs should include the operation name, canonical target, process architecture, operating-system build, and the state that was validated immediately before the call. 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 this result, collect evidence because a restart may clear the state responsible for it. When a it 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 this result. A useful incident timeline shows the successful setup steps, the first operation returning it, and any secondary errors produced during its rollback.

How it differs from related results

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

Evidence worth collecting

Capture evidence around the condition “the request was sent to the wrong device type.” The result 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 it check should be to log the device path, category, function, input length, and caller architecture.

Recovery and verification

Recovery from it is complete only when the original operation succeeds under the same relevant conditions. After fixing it, 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 it are idempotent. If it disappears only after reboot, continue investigating the owner or leaked state rather than treating reboot as the permanent correction.

When to escalate

Escalate it with a minimal reproduction, the exact it value, application and component versions, target path or device class, and the collected state before and after this failure. For a legacy the 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.