Changeset 82846 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jan 24, 2020 9:36:52 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r82689 r82846 161 161 /* The IDataObject *must* be created on the same thread as our (proxy) window, so post a message to it 162 162 * to do the stuff for us. */ 163 const SHCLEVENTID uEvent = ShClEventIDGenerate(&pTransfer->Events);164 165 rc = ShClEventRegister(&pTransfer->Events, uEvent);163 const SHCLEVENTID idEvent = ShClEventIDGenerate(&pTransfer->Events); 164 165 rc = ShClEventRegister(&pTransfer->Events, idEvent); 166 166 if (RT_SUCCESS(rc)) 167 167 { 168 168 /* Don't want to rely on SendMessage (synchronous) here, so just post and wait the event getting signalled. */ 169 ::PostMessage(pCtx->Win.hWnd, SHCL_WIN_WM_TRANSFER_START, (WPARAM)pTransfer, (LPARAM) uEvent);169 ::PostMessage(pCtx->Win.hWnd, SHCL_WIN_WM_TRANSFER_START, (WPARAM)pTransfer, (LPARAM)idEvent); 170 170 171 171 PSHCLEVENTPAYLOAD pPayload; 172 rc = ShClEventWait(&pTransfer->Events, uEvent, 30 * 1000 /* Timeout in ms */, &pPayload);172 rc = ShClEventWait(&pTransfer->Events, idEvent, 30 * 1000 /* Timeout in ms */, &pPayload); 173 173 if (RT_SUCCESS(rc)) 174 174 { … … 179 179 } 180 180 181 ShClEventUnregister(&pTransfer->Events, uEvent);181 ShClEventUnregister(&pTransfer->Events, idEvent); 182 182 } 183 183 } … … 671 671 AssertPtr(pTransfer); 672 672 673 const SHCLEVENTID uEvent = (SHCLEVENTID)lParam;673 const SHCLEVENTID idEvent = (SHCLEVENTID)lParam; 674 674 675 675 Assert(ShClTransferGetSource(pTransfer) == SHCLSOURCE_REMOTE); /* Sanity. */ … … 678 678 679 679 PSHCLEVENTPAYLOAD pPayload = NULL; 680 int rc = ShClPayloadAlloc( uEvent, &rcTransfer, sizeof(rcTransfer), &pPayload);680 int rc = ShClPayloadAlloc(idEvent, &rcTransfer, sizeof(rcTransfer), &pPayload); 681 681 if (RT_SUCCESS(rc)) 682 682 { 683 rc = ShClEventSignal(&pTransfer->Events, uEvent, pPayload);683 rc = ShClEventSignal(&pTransfer->Events, idEvent, pPayload); 684 684 if (RT_FAILURE(rc)) 685 685 ShClPayloadFree(pPayload);
Note:
See TracChangeset
for help on using the changeset viewer.