Changeset 103450 in vbox for trunk/src/VBox/GuestHost/SharedClipboard
- Timestamp:
- Feb 19, 2024 2:55:20 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
r100665 r103450 1192 1192 1193 1193 /** 1194 * Hands off a transfer to the current data object in-flight. 1195 * 1196 * @returns VBox status code. 1197 * @param pWinCtx Windows context to use. 1198 * @param pTransfer Transfer to hand off to the data object. 1199 * 1200 * @note The data object will be put into running state on success and handed over to Windows. 1201 * Our data object pointer will be invalid afterwards. 1202 */ 1203 int SharedClipboardWinTransferHandOffToDataObject(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer) 1204 { 1205 int rc = RTCritSectEnter(&pCtx->Win.CritSect); 1206 if (RT_SUCCESS(rc)) 1207 { 1208 SharedClipboardWinDataObject *pObj = pCtx->Win.pDataObjInFlight; 1209 if (pObj) 1210 { 1211 rc = pObj->SetTransfer(pTransfer); 1212 if (RT_SUCCESS(rc)) 1213 rc = pObj->SetStatus(SharedClipboardWinDataObject::Running); 1214 1215 pCtx->Win.pDataObjInFlight = NULL; /* Hand off to Windows. */ 1216 } 1217 else 1218 { 1219 AssertMsgFailed(("No data object in flight (yet)!\n")); 1220 rc = VERR_WRONG_ORDER); 1221 } 1222 1223 int rc2 = RTCritSectLeave(&pCtx->Win.CritSect); 1224 AssertRC(rc2); 1225 } 1226 1227 return rc; 1228 } 1229 1230 /** 1194 1231 * Retrieves the roots for a transfer by opening the clipboard and getting the clipboard data 1195 1232 * as string list (CF_HDROP), assigning it to the transfer as roots then.
Note:
See TracChangeset
for help on using the changeset viewer.