| Previous | Next |
| WINBIO_E_INCORRECT_SESSION_TYPE | WINBIO_E_DEADLOCK_DETECTED |
WINBIO_E_SESSION_HANDLE_CLOSED
WINBIO_E_SESSION_HANDLE_CLOSED is a lifetime error: code is using a WinBio session after the close path has run. This is especially easy to expose with asynchronous sessions because completion notifications and cancellation can overlap application shutdown logic.
Serialize session teardown
- Give one component ownership of
WinBioCloseSessionand make repeated close requests observable in logs. - Stop issuing new operations before teardown and use
WinBioWaitwhen the session model requires pending operations to complete or cancel. - Ensure callbacks do not re-enter code that schedules work on a handle already marked closed by another thread.
Microsoft documents different close behavior for synchronous and asynchronous handles; asynchronous close itself completes through the configured notification path. Therefore, “close requested” and “session no longer usable” must be represented carefully in application state. Reopening a session may hide the race temporarily but does not fix duplicate ownership of the old handle.
WinBioCloseSession · WinBioWait
Looking for a different code? Search another status or error code.
