---
title: Peek
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/iodataqueuedispatchsource/peek
---

# Peek

Returns the next queue entry without removing it from the queue.

## Declaration

```occ
kern_return_t Peek(IODataQueueClientDequeueEntryBlock callback);
```

## Parameters

- `callback`: The callback you use to examine the next entry in the queue.

## Return Value

Return Value kIOReturnSuccess on success, kIOReturnUnderrun if the queue is empty, or kIOReturnError if the queue is corrupt. See Error Codes.

## See Also

### Removing Work from the Queue

- [SetDataAvailableHandler](driverkit/iodataqueuedispatchsource/setdataavailablehandler.md)
- [DataAvailable](driverkit/iodataqueuedispatchsource/dataavailable.md)
- [IsDataAvailable](driverkit/iodataqueuedispatchsource/isdataavailable.md)
- [Dequeue](driverkit/iodataqueuedispatchsource/dequeue.md)
- [DequeueWithCoalesce](driverkit/iodataqueuedispatchsource/dequeuewithcoalesce.md)
- [SendDataServiced](driverkit/iodataqueuedispatchsource/senddataserviced.md)
- [IODataQueueClientDequeueEntryBlock](driverkit/iodataqueueclientdequeueentryblock.md)
