| Previous | Next |
| ERROR_SMB_GUEST_LOGON_BLOCKED | ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED |
ERROR_CALLBACK_SUPPLIED_INVALID_DATA
The callback supplied data that the receiving API cannot accept.
ERROR_CALLBACK_SUPPLIED_INVALID_DATA is Win32 error 1273 (0x4F9). A framework or system component invoked application code, and that callback produced values inconsistent with the callback contract. The caller detected invalid output rather than an internal failure before callback invocation.
Common callback defects
- a structure size or version field is wrong
- the callback returns a pointer whose storage has already expired
- a count does not match the number of initialized array elements
- required fields are left uninitialized on one branch
- text is not terminated, encoded, or bounded as the API specifies
- the callback modifies input-only memory or returns an unsupported flag combination
Evidence to retain
Record the callback type, call sequence, input sizes, output sizes, structure version, return value, and validation rule that failed. In a debug build, copy safe scalar fields before the callback returns. Do not log arbitrary pointed-to memory, because the invalid pointer itself may cause another fault or expose sensitive data.
Diagnostic sequence
Read the exact callback declaration and ownership rules, including which side allocates buffers and how long returned memory must remain valid. Initialize every output structure to zero, set documented size fields, and validate all callback outputs immediately at the boundary. Compare 32-bit and 64-bit packing if the failure occurs only in one architecture.
Check exception and cancellation paths. A callback can return early without populating mandatory fields, while the normal path appears correct. Also inspect concurrent use: returning a pointer to shared mutable storage can make data valid at return time but invalid when the caller consumes it.
Recovery and containment
Reject the callback result and avoid using partially validated data. When the callback belongs to a plug-in, disable only the failing plug-in or isolate it out of process if possible. Retrying the same callback without changing state is unlikely to help and may repeat corruption.
Developer recommendations
- wrap raw callbacks in typed adapters that validate sizes and ranges
- use caller-owned buffers where the API permits them
- test empty, maximum-size, cancellation, and exception paths
- include ABI and structure-version tests in plug-in compatibility suites
Related results
ERROR_INVALID_DATA is a general invalid-data code. ERROR_INVALID_PARAMETER usually concerns input supplied to a function. Error 1273 specifically attributes the unacceptable data to application-defined callback output.
Example
A discovery plug-in callback reports three endpoints but initializes only two array entries. The host validates the count and returns 1273 before dereferencing the third entry. Correcting the count and zero-initializing the output prevents both the error and a potential invalid-pointer crash.
References
- Microsoft: System Error Codes (1000–1299)
- Microsoft: Callbacks in Windows
- Microsoft: Using the Windows Headers
- Microsoft: Debug System Error Codes
Looking for a different code? Search another status or error code.
