| 74 | } |
| 75 | |
| 76 | BOOL Ext2ReadPipe(HANDLE p, PVOID b, DWORD c, PDWORD r) |
| 77 | { |
| 78 | DWORD bytes = 0, total = 0; |
| 79 | BOOL rc = FALSE; |
| 80 | |
| 81 | while (total < c) { |
| 82 | rc = ReadFile(p,(PCHAR)b + total, c - total, &bytes, NULL); |
| 83 | if (rc) { |
| 84 | total += bytes; |
| 85 | } else { |
| 86 | break; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | if (r) |
| 91 | *r = total; |
| 92 | return rc; |
| 93 | } |
| 94 | |
| 95 | |
| 96 | BOOL Ext2WritePipe(HANDLE p, PVOID b, DWORD c, PDWORD w) |