Changeset 100619 in vbox
- Timestamp:
- Jul 18, 2023 8:06:24 AM (20 months ago)
- svn:sync-xref-src-repo-rev:
- 158450
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r100374 r100619 265 265 typedef struct _SHCLEXTSTATE 266 266 { 267 /** Pointer to the actual service extension handle. */ 267 /** Pointer to the actual service extension handle. 268 * 269 * Must return VERR_NOT_SUPPORTED if the extension didn't handle the requested function. 270 * This will invoke the regular backend then. 271 */ 268 272 PFNHGCMSVCEXT pfnExtension; 269 273 /** Opaque pointer to extension-provided data. Don't touch. */ -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r100613 r100619 1617 1617 SHCLEXTPARMS parms; 1618 1618 RT_ZERO(parms); 1619 1619 1620 parms.u.ReportFormats.uFormats = fFormats; 1620 1621 1621 g_ExtState.pfnExtension(g_ExtState.pvExtension, VBOX_CLIPBOARD_EXT_FN_FORMAT_ANNOUNCE, &parms, sizeof(parms));1622 rc = g_ExtState.pfnExtension(g_ExtState.pvExtension, VBOX_CLIPBOARD_EXT_FN_FORMAT_ANNOUNCE, &parms, sizeof(parms)); 1622 1623 } 1623 1624 else 1625 rc = VERR_NOT_SUPPORTED; 1626 1627 /* Let the backend implementation know if the extension above didn't handle the format(s). */ 1628 if (rc == VERR_NOT_SUPPORTED) 1624 1629 { 1625 1630 #ifdef LOG_ENABLED … … 1783 1788 } 1784 1789 else 1790 rc = VERR_NOT_SUPPORTED; 1791 1792 /* Try reading from the backend if the extension above didn't handle the read. */ 1793 if (rc == VERR_NOT_SUPPORTED) 1785 1794 { 1786 1795 rc = ShClBackendReadData(&g_ShClBackend, pClient, &cmdCtx, uFormat, pvData, cbData, &cbActual); … … 1949 1958 SHCLEXTPARMS parms; 1950 1959 RT_ZERO(parms); 1960 1951 1961 parms.u.ReadWriteData.uFormat = uFormat; 1952 1962 parms.u.ReadWriteData.pvData = pvData; 1953 1963 parms.u.ReadWriteData.cbData = cbData; 1954 1964 1955 g_ExtState.pfnExtension(g_ExtState.pvExtension, VBOX_CLIPBOARD_EXT_FN_DATA_WRITE, &parms, sizeof(parms)); 1956 rc = VINF_SUCCESS; 1965 rc = g_ExtState.pfnExtension(g_ExtState.pvExtension, VBOX_CLIPBOARD_EXT_FN_DATA_WRITE, &parms, sizeof(parms)); 1957 1966 } 1958 1967 else 1959 { 1960 /* Let the backend implementation know. */ 1968 rc = VERR_NOT_SUPPORTED; 1969 1970 /* Let the backend implementation know if the extension above didn't handle the write. */ 1971 if (rc == VERR_NOT_SUPPORTED) 1972 { 1961 1973 rc = ShClBackendWriteData(&g_ShClBackend, pClient, &cmdCtx, uFormat, pvData, cbData); 1962 1974 if (RT_FAILURE(rc)) -
trunk/src/VBox/Main/src-client/GuestShClPrivate.cpp
r100616 r100619 221 221 * 222 222 * @returns VBox status code. 223 * @retval VERR_NOT_SUPPORTED if the extension didn't handle the requested function. This will invoke the regular backend then. 223 224 * @param pvExtension Pointer to service extension. 224 225 * @param u32Function Callback HGCM message ID. … … 239 240 /* pParms might be NULL, depending on the message. */ 240 241 241 int vrc = VINF_SUCCESS;242 int vrc; 242 243 243 244 switch (u32Function) … … 250 251 251 252 default: 253 vrc = VERR_NOT_SUPPORTED; 252 254 break; 253 255 } … … 255 257 PSHCLSVCEXT const pExt = &pThis->m_SvcExtVRDP; /* Currently we have one extension only. */ 256 258 257 if (pExt->pfnExt) 258 { 259 int vrc2 = pExt->pfnExt(pExt->pvExt, u32Function, pvParms, cbParms); 260 if (RT_SUCCESS(vrc)) 261 vrc = vrc2; 262 } 259 if (pExt->pfnExt) /* Overwrite rc if we have an extension present. */ 260 vrc = pExt->pfnExt(pExt->pvExt, u32Function, pvParms, cbParms); 263 261 264 262 LogFlowFuncLeaveRC(vrc);
Note:
See TracChangeset
for help on using the changeset viewer.