Changeset 85834 in vbox for trunk/src/VBox/HostServices/SharedClipboard
- Timestamp:
- Aug 19, 2020 2:05:37 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 139994
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r85773 r85834 316 316 317 317 /** 318 * Reads clipboard data from the guest and passes it to the X11 clipboard.318 * Callback implementation for reading clipboard data from the guest. 319 319 * 320 320 * @note Runs in Xt event thread. 321 321 * 322 * @ param pCtx Pointer to the host clipboard structure.323 * @param fFormat The format in which the data should be transferred324 * (VBOX_SHCL_FMT_XXX).325 * @param ppv On success and if pcb > 0, this will point to a buffer326 * to be freed with RTMemFree containing the data read.327 * @param pcb On success, this contains the number of bytes of data328 * 322 * @returns VBox status code. VERR_NO_DATA if no data available. 323 * @param pCtx Pointer to the host clipboard structure. 324 * @param fFormat The format in which the data should be transferred 325 * (VBOX_SHCL_FMT_XXX). 326 * @param ppv On success and if pcb > 0, this will point to a buffer 327 * to be freed with RTMemFree containing the data read. 328 * @param pcb On success, this contains the number of bytes of data returned. 329 329 */ 330 330 DECLCALLBACK(int) ShClX11RequestDataForX11Callback(PSHCLCONTEXT pCtx, SHCLFORMAT fFormat, void **ppv, uint32_t *pcb) … … 356 356 if (RT_SUCCESS(rc)) 357 357 { 358 *ppv = pPayload ? pPayload->pvData : NULL; 359 *pcb = pPayload ? pPayload->cbData : 0; 358 if ( !pPayload 359 || !pPayload->cbData) 360 { 361 rc = VERR_NO_DATA; 362 } 363 else 364 { 365 *ppv = pPayload->pvData; 366 *pcb = pPayload->cbData; 367 } 360 368 } 361 369
Note:
See TracChangeset
for help on using the changeset viewer.