| Previous | Next |
| ERROR_GPIO_INVALID_REGISTRATION_PACKET | ERROR_GPIO_INCOMPATIBLE_CONNECT_MODE |
ERROR_GPIO_OPERATION_DENIED
GPIO handle does not permit the requested operation
ERROR_GPIO_OPERATION_DENIED is Windows system result 15325 (0x00003BDD). The handle can be valid while its connection type or granted operation set excludes the request.
This result is a contract mismatch between a GPIO handle and an operation. Typical examples include writing through an input connection, changing interrupt state through an I/O-only handle, or invoking an operation unsupported by the controller.
Where this value belongs
- A GPIO client reads, writes, reconfigures, or controls pins through an existing handle.
- A handle survives a power transition but its connection state changes.
- Generic device code sends an operation without checking the connection mode.
The code should be diagnosed from handle provenance and requested operation, not by assuming access control or device absence.
Common interpretation mistakes
- It is mishandled when a valid handle is assumed to support every GPIO operation.
- It is mishandled when input and output connection handles are interchangeable.
- It is mishandled when a stale handle is reused after disconnect and reconnect.
- It is mishandled when the controller capability is not checked before issuing the request.
Diagnostic sequence
- Record where and with what mode the handle was created.
- Identify the exact denied operation and pin set.
- Confirm the connection remains active after power transitions.
- Compare requested direction and interrupt semantics with controller capabilities.
- Open a fresh handle with the intended mode in a controlled test.
- Verify cleanup closes the original handle before mode changes.
Evidence worth keeping
- preserve handle creation call and requested mode.
- preserve pin numbers and direction.
- preserve denied operation identifier.
- preserve controller capability report.
- preserve connect, disconnect, and power-transition sequence.
The most useful evidence is the handle’s creation contract; a bare numeric handle cannot explain what operations it permits.
Correct handling and recovery
Use an operation supported by the existing connection or close and reopen the pins with the correct documented mode and ownership.
Retry only after the handle or connection mode changes. Repeating a denied operation on the same unchanged handle is deterministic.
Difference from nearby values
ERROR_INVALID_HANDLE means the handle is not valid. Code 15325 can describe a valid GPIO handle whose operation set does not include the request.
Practical scenario
A client opens a pin as input and later sends a write request through the same handle. Logging the connection direction makes the mismatch obvious; reopening as output allows the write.
Implementation guidance
Wrap GPIO handles in typed objects that expose only valid operations. Power-management code should invalidate or revalidate handles when connection state changes.
For code 15325, record gpio_denied_handle_type, gpio_denied_operation, gpio_denied_mode, gpio_denied_pins, and gpio_denied_power_state.
References
- Microsoft: System Error Codes 12000–15999
- Microsoft: GpioClx DDI
- Microsoft: GPIO_CLIENT_CONNECT_IO_PINS
Looking for a different code? Search another status or error code.