| 508 | } |
| 509 | |
| 510 | int ipcRecvData(ipcHandle *handle, void *data, size_t sz) { |
| 511 | DWORD cbRead = 0; |
| 512 | |
| 513 | if (!ReadFile(handle->hMailslot[0], data, (DWORD)sz, &cbRead, NULL)) { |
| 514 | printf("IPC failure: ReadFile failed with %d.\n", GetLastError()); |
| 515 | return -1; |
| 516 | } |
| 517 | |
| 518 | if (sz != (size_t)cbRead) { |
| 519 | printf( |
| 520 | "IPC failure: ReadFile didn't receive the expected number of bytes\n"); |
| 521 | return -1; |
| 522 | } |
| 523 | |
| 524 | return 0; |
| 525 | } |
| 526 | |
| 527 | int ipcSendShareableHandles( |
| 528 | ipcHandle *handle, const std::vector<ShareableHandle> &shareableHandles, |
no outgoing calls
no test coverage detected