| 5516 | } |
| 5517 | |
| 5518 | static int win_overlapped_wait(HANDLE handle, OVERLAPPED *overlapped, DWORD timeout_ms, |
| 5519 | DWORD *transferred_out) { |
| 5520 | win_pending_io_t pending = {.handle = handle, .overlapped = overlapped}; |
| 5521 | cbm_ipc_pending_ops_t ops = { |
| 5522 | .context = &pending, |
| 5523 | .wait = win_pending_wait, |
| 5524 | .cancel = win_pending_cancel, |
| 5525 | .finish = win_pending_finish, |
| 5526 | }; |
| 5527 | uint32_t transferred = 0; |
| 5528 | int result = cbm_daemon_ipc_wait_pending(&ops, timeout_ms, &transferred); |
| 5529 | if (result == 1) { |
| 5530 | *transferred_out = (DWORD)transferred; |
| 5531 | } |
| 5532 | return result; |
| 5533 | } |
| 5534 | |
| 5535 | static bool win_pipe_client_is_current_user(HANDLE pipe) { |
| 5536 | /* Validate the connected client by its process token, resolved from the |
no test coverage detected