---
title: getFirstElementIndex
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/ioreporter_ivars/getfirstelementindex
---

# getFirstElementIndex

## Declaration

```occ
virtual IOReturn getFirstElementIndex(uint64_t channel_id, int *element_index);
```

## Parameters

- `channel_id`: ID of the channel
- `element_index`: pointer to the returned element_index

## Return Value

Return Value Appropriate IOReturn code

## Discussion

Discussion Returns the first element index for a channel For efficiently and thread-safely reading _elements Locking: Caller must ensure that the reporter (data) lock is held.
