<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "OpenDirectory",
  "identifier" : "/documentation/OpenDirectory/ODQueryCopyResults(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Open Directory"
    ],
    "preciseIdentifier" : "c:@F@ODQueryCopyResults"
  },
  "title" : "ODQueryCopyResults(_:_:_:)"
}
-->

# ODQueryCopyResults(_:_:_:)

Returns results from a query synchronously.

```
func ODQueryCopyResults(_ query: ODQueryRef!, _ allowPartialResults: Bool, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<CFArray>!
```

## Parameters

`query`

The query.

`allowPartialResults`

If `true`, only immediately available results are returned; otherwise, the function waits until all results are available.

`error`

An error reference for error details. Can be `NULL`.

## Return Value

The results of the query in an array of `ODRecord` objects.

---

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)