| 94 | |
| 95 | |
| 96 | BOOL Ext2WritePipe(HANDLE p, PVOID b, DWORD c, PDWORD w) |
| 97 | { |
| 98 | DWORD bytes = 0, total = 0; |
| 99 | BOOL rc = FALSE; |
| 100 | |
| 101 | while (total < c) { |
| 102 | rc = WriteFile(p, (PCHAR)b + total, c - total, &bytes, NULL); |
| 103 | if (rc) { |
| 104 | total += bytes; |
| 105 | } else { |
| 106 | break; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | if (w) |
| 111 | *w = total; |
| 112 | return rc; |
| 113 | } |
| 114 | |
| 115 | |
| 116 | DWORD Ext2PipeControl(PPIPE_REQ *pr, ULONG *len) |