| 141 | } |
| 142 | |
| 143 | BOOL MountPointManager::wait_multiple_and_destroy(int count, HANDLE handles[], wstring mountpoints[]) |
| 144 | { |
| 145 | |
| 146 | const DWORD timeout = UNMOUNT_TIMEOUT; |
| 147 | |
| 148 | DWORD status = WaitForMultipleObjects(count, handles, TRUE, timeout); |
| 149 | |
| 150 | DWORD first = WAIT_OBJECT_0; |
| 151 | DWORD last = WAIT_OBJECT_0 + (count - 1); |
| 152 | |
| 153 | if (status >= first && status <= last) { |
| 154 | for (int i = 0; i < count; i++) { |
| 155 | destroy(mountpoints[i].c_str()); |
| 156 | } |
| 157 | return TRUE; |
| 158 | } else { |
| 159 | return FALSE; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | BOOL MountPointManager::wait_all_and_destroy() { |
| 164 |
nothing calls this directly
no outgoing calls
no test coverage detected