<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IOReporter_IVars/copyElementValues",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOReporter_IVars@F@copyElementValues#I#*$@SA@IOReportElementValues#"
  },
  "title" : "copyElementValues"
}
-->

# copyElementValues

```
virtual IOReturn copyElementValues(int element_index, IOReportElementValues *elementValues);
```

## Parameters

`element_index`

- Index of the element to return values from

`elementValues`

- For returning the content of element values

## Return Value

Returns the content of an element

## Discussion

\abstract Copies the values of an internal element to *elementValues
\discussion For efficiently and thread-safely reading _elements.
May need to find the index of the element first.

Locking: Caller must ensure that the reporter (data) lock is held.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)