Changeset 66075 in vbox
- Timestamp:
- Mar 14, 2017 9:30:32 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvHostBase-win.cpp
r65079 r66075 539 539 540 540 541 DECLHIDDEN(int) drvHostBasePollerWakeupOs(PDRVHOSTBASE pThis)542 {543 if (pThis->Os.hwndDeviceChange)544 PostMessage(pThis->Os.hwndDeviceChange, WM_CLOSE, 0, 0); /* default win proc will destroy the window */545 546 return VINF_SUCCESS;547 }548 549 550 541 DECLHIDDEN(int) drvHostBaseQueryMediaStatusOs(PDRVHOSTBASE pThis, bool *pfMediaChanged, bool *pfMediaPresent) 551 542 { … … 565 556 DECLHIDDEN(void) drvHostBaseDestructOs(PDRVHOSTBASE pThis) 566 557 { 558 /* 559 * Terminate the thread. 560 */ 561 if (pThis->Os.hThrdMediaChange != NIL_RTTHREAD) 562 { 563 int rc; 564 int cTimes = 50; 565 do 566 { 567 if (pThis->hwndDeviceChange) 568 PostMessage(pThis->hwndDeviceChange, WM_CLOSE, 0, 0); /* default win proc will destroy the window */ 569 570 rc = RTThreadWait(pThis->Os.hThrdMediaChange, 100, NULL); 571 } while (cTimes-- > 0 && rc == VERR_TIMEOUT); 572 573 if (RT_SUCCESS(rc)) 574 pThis->Os.hThrdMediaChange = NIL_RTTHREAD; 575 } 576 567 577 /* 568 578 * Unlock the drive if we've locked it or we're in passthru mode.
Note:
See TracChangeset
for help on using the changeset viewer.