Lines Matching defs:pArea

103 static HGSMIOFFSET hgsmiBufferInitializeSingle (const HGSMIAREA *pArea,
109 if ( !pArea
120 HGSMISIZE cbMaximumDataSize = pArea->offLast - pArea->offBase;
123 || (uint8_t *)pHeader < pArea->pu8Base
124 || (uint8_t *)pHeader > pArea->pu8Base + cbMaximumDataSize - u32DataSize)
129 HGSMIOFFSET offBuffer = HGSMIPointerToOffset (pArea, pHeader);
145 int HGSMIAreaInitialize (HGSMIAREA *pArea, void *pvBase, HGSMISIZE cbArea, HGSMIOFFSET offBase)
149 if ( !pArea /* Check that the area: */
158 pArea->pu8Base = pu8Base;
159 pArea->offBase = offBase;
160 pArea->offLast = cbArea - HGSMIBufferMinimumSize () + offBase;
161 pArea->cbArea = cbArea;
166 void HGSMIAreaClear (HGSMIAREA *pArea)
168 if (pArea)
170 memset (pArea, 0, sizeof (HGSMIAREA));
177 HGSMIOFFSET HGSMIBufferInitializeSingle (const HGSMIAREA *pArea,
188 return hgsmiBufferInitializeSingle (pArea, pHeader, cbBuffer - HGSMIBufferMinimumSize (), u8Channel, u16ChannelInfo);
424 static int hgsmiVerifyBuffer(const HGSMIAREA *pArea,
429 offBuffer, pArea->pu8Base, pArea->cbArea, pArea->offBase, pArea->offLast));
433 if ( offBuffer < pArea->offBase
434 || offBuffer > pArea->offLast)
437 offBuffer, pArea->offBase, pArea->offLast));
443 void *pvBuffer = HGSMIOffsetToPointer(pArea, offBuffer);
449 LogFlowFunc(("datasize check: header.u32DataSize = 0x%x pArea->offLast - offBuffer = 0x%x\n",
450 header.u32DataSize, pArea->offLast - offBuffer));
452 if (header.u32DataSize <= pArea->offLast - offBuffer)
478 header.u32DataSize, pArea->offLast - offBuffer));
535 * @param pArea Area which supposed to contain the buffer.
539 int HGSMIBufferProcess(HGSMIAREA *pArea,
543 LogFlowFunc(("pArea %p, offBuffer 0x%x\n", pArea, offBuffer));
545 AssertPtrReturn(pArea, VERR_INVALID_PARAMETER);
550 int rc = hgsmiVerifyBuffer(pArea, offBuffer, &bufferContext);
560 HGSMI_STRICT_ASSERT(RT_SUCCESS(hgsmiVerifyBuffer(pArea, offBuffer, &bufferContext)));