public override TrinityErrorCode LoadCell(long cellId, out byte[] cellBuff) { int index, cellSize; byte * cellPtr = null; TrinityErrorCode eResult = CLocalMemoryStorage.CGetLockedCellInfo4LoadCell(cellId, out cellSize, out cellPtr, out index); if (eResult == TrinityErrorCode.E_CELL_NOT_FOUND) { cellBuff = new byte[0]; return(eResult); } cellBuff = new byte[cellSize]; Memory.Copy(cellPtr, 0, cellBuff, 0, cellSize); CLocalMemoryStorage.CReleaseCellLock(cellId, index); return(TrinityErrorCode.E_SUCCESS); }