What does Windows error code 1168 (ERROR_NOT_FOUND) mean?

 
Previous Next
ERROR_DEVICE_NOT_CONNECTED ERROR_NO_MATCH

ERROR_NOT_FOUND

The requested element was not found.

ERROR_NOT_FOUND has decimal value 1168 (0x490). Its system text is deliberately generic because many Windows subsystems use “element” for different objects: a network path entry, device property, configuration item, collection member, or another API-defined record. The code is useful only when kept together with the exact function and lookup key.

Do not translate it automatically to “file missing”

Win32 already has ERROR_FILE_NOT_FOUND and ERROR_PATH_NOT_FOUND for filesystem naming failures. Error 1168 normally means that the API searched its own collection or table and did not find an element matching the supplied identity. For example, networking and device-installation APIs document 1168 for missing rows or properties.

Context to preserve

  • function, interface method, or IOCTL that returned the value
  • the complete key: GUID, LUID, index, property key, name, or composite row
  • scope of the search, such as interface, device class, user, machine, or namespace
  • whether the operation was read, update, or delete
  • generation or timestamp of the collection being queried

Composite keys deserve special attention. A row can exist for an interface but not for the destination address or address family combined with it, so logging only one field makes a valid “not found” result look impossible.

Typical causes

  • the element was removed between enumeration and use
  • a cached identifier belongs to an earlier device or configuration generation
  • the caller searches the wrong user, interface, class, or namespace
  • normalization changes case, encoding, GUID form, or address family
  • a delete operation is repeated after the first delete already succeeded

Handling strategy

For queries, return an explicit “absent” result to the caller and decide whether absence is expected. For idempotent deletion, 1168 can often be treated as the desired final state after auditing the original request. For updates, do not silently create a new element unless the API contract and product policy explicitly allow an upsert.

A retry helps only after refreshing the collection or learning that another component is creating the element. Repeating the same lookup against unchanged state is not recovery.

Developer recommendations

  • keep enumeration and mutation close together or revalidate versioned identifiers
  • separate “not found” from access denial and malformed-key errors in public APIs
  • log structured key fields rather than only a localized message
  • test removal races and repeated delete requests

Difference from nearby codes

ERROR_NO_MATCH says that no candidate satisfies matching criteria, often after compatibility comparison. ERROR_SET_NOT_FOUND identifies an absent property or control set. ERROR_FILE_NOT_FOUND names a filesystem-style lookup failure. Error 1168 is the general API-level missing-element result.

Example

A network monitor enumerates an IP path row, stores its interface LUID and destination, and later queries it after a route change. GetIpPathEntry returns 1168 because that interface/destination combination no longer exists. Refreshing the route table and replacing the stale row key is correct; searching the filesystem for a missing file is not.

References


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