| 6346 | } |
| 6347 | |
| 6348 | static int win_overlapped_wait(HANDLE handle, OVERLAPPED *overlapped, DWORD timeout_ms, |
| 6349 | DWORD *transferred_out) { |
| 6350 | win_pending_io_t pending = {.handle = handle, .overlapped = overlapped}; |
| 6351 | cbm_ipc_pending_ops_t ops = { |
| 6352 | .context = &pending, |
| 6353 | .wait = win_pending_wait, |
| 6354 | .cancel = win_pending_cancel, |
| 6355 | .finish = win_pending_finish, |
| 6356 | }; |
| 6357 | uint32_t transferred = 0; |
| 6358 | int result = cbm_daemon_ipc_wait_pending(&ops, timeout_ms, &transferred); |
| 6359 | if (result == 1) { |
| 6360 | *transferred_out = (DWORD)transferred; |
| 6361 | } |
| 6362 | return result; |
| 6363 | } |
| 6364 | |
| 6365 | static bool win_pipe_client_is_current_user(HANDLE pipe) { |
| 6366 | /* Validate the connected client by its process token, resolved from the |
no test coverage detected