Lines Matching defs:pBuffer

174         CRVBOXSVCBUFFER_t *pBuffer = g_pCRVBoxSVCBuffers;
179 while (pBuffer)
181 rc = SSMR3PutU32(pSSM, pBuffer->uiId);
184 rc = SSMR3PutU32(pSSM, pBuffer->uiSize);
187 rc = SSMR3PutMem(pSSM, pBuffer->pData, pBuffer->uiSize);
190 pBuffer = pBuffer->pNext;
271 CRVBOXSVCBUFFER_t *pBuffer = (CRVBOXSVCBUFFER_t *) RTMemAlloc(sizeof(CRVBOXSVCBUFFER_t));
272 if (!pBuffer)
276 pBuffer->uiId = uiId;
278 rc = SSMR3GetU32(pSSM, &pBuffer->uiSize);
281 pBuffer->pData = RTMemAlloc(pBuffer->uiSize);
282 if (!pBuffer->pData)
284 RTMemFree(pBuffer);
288 rc = SSMR3GetMem(pSSM, pBuffer->pData, pBuffer->uiSize);
291 pBuffer->pNext = g_pCRVBoxSVCBuffers;
292 pBuffer->pPrev = NULL;
295 g_pCRVBoxSVCBuffers->pPrev = pBuffer;
297 g_pCRVBoxSVCBuffers = pBuffer;
332 CRVBOXSVCBUFFER_t* pBuffer;
336 pBuffer = g_pCRVBoxSVCBuffers;
337 while (pBuffer)
339 if (pBuffer->uiId == iBuffer)
341 if (cbBufferSize && pBuffer->uiSize!=cbBufferSize)
349 iBuffer, pBuffer->uiSize, cbBufferSize));
353 return pBuffer;
355 pBuffer = pBuffer->pNext;
361 pBuffer = (CRVBOXSVCBUFFER_t*) RTMemAlloc(sizeof(CRVBOXSVCBUFFER_t));
362 if (pBuffer)
364 pBuffer->pData = RTMemAlloc(cbBufferSize);
365 if (!pBuffer->pData)
368 RTMemFree(pBuffer);
371 pBuffer->uiId = ++g_CRVBoxSVCBufferID;
372 if (!pBuffer->uiId)
374 pBuffer->uiId = ++g_CRVBoxSVCBufferID;
376 Assert(pBuffer->uiId);
377 pBuffer->uiSize = cbBufferSize;
378 pBuffer->pPrev = NULL;
379 pBuffer->pNext = g_pCRVBoxSVCBuffers;
382 g_pCRVBoxSVCBuffers->pPrev = pBuffer;
384 g_pCRVBoxSVCBuffers = pBuffer;
390 return pBuffer;
394 static void svcFreeBuffer(CRVBOXSVCBUFFER_t* pBuffer)
396 Assert(pBuffer);
398 if (pBuffer->pPrev)
400 pBuffer->pPrev->pNext = pBuffer->pNext;
404 Assert(pBuffer==g_pCRVBoxSVCBuffers);
405 g_pCRVBoxSVCBuffers = pBuffer->pNext;
408 if (pBuffer->pNext)
410 pBuffer->pNext->pPrev = pBuffer->pPrev;
413 RTMemFree(pBuffer->pData);
414 RTMemFree(pBuffer);
453 if ( paParms[0].type != VBOX_HGCM_SVC_PARM_PTR /* pBuffer */
461 uint8_t *pBuffer = (uint8_t *)paParms[0].u.pointer.addr;
465 rc = crVBoxServerClientWrite(u32ClientID, pBuffer, cbBuffer);
487 || paParms[1].type != VBOX_HGCM_SVC_PARM_PTR /* pBuffer */
496 uint8_t *pBuffer = (uint8_t *)paParms[1].u.pointer.addr;
500 rc = crVBoxServerClientWrite(u32InjectClientID, pBuffer, cbBuffer);
526 if ( paParms[0].type != VBOX_HGCM_SVC_PARM_PTR /* pBuffer */
534 uint8_t *pBuffer = (uint8_t *)paParms[0].u.pointer.addr;
538 rc = crVBoxServerClientRead(u32ClientID, pBuffer, &cbBuffer);
565 if ( paParms[0].type != VBOX_HGCM_SVC_PARM_PTR /* pBuffer */
575 uint8_t *pBuffer = (uint8_t *)paParms[0].u.pointer.addr;
582 rc = crVBoxServerClientWrite(u32ClientID, pBuffer, cbBuffer);
675 || paParms[3].type != VBOX_HGCM_SVC_PARM_PTR /*pBuffer*/
686 uint8_t *pBuffer = (uint8_t *)paParms[3].u.pointer.addr;
697 memcpy((void*)((uintptr_t)pSvcBuffer->pData+ui32Offset), pBuffer, cbBuffer);
740 uint8_t *pBuffer = (uint8_t *)pSvcBuffer->pData;
744 rc = crVBoxServerClientWrite(u32ClientID, pBuffer, cbBuffer);