---
title: "ODQuerySetCallback(_:_:_:)"
framework: opendirectory
role: symbol
role_heading: Function
path: "opendirectory/odquerysetcallback(_:_:_:)"
---

# ODQuerySetCallback(_:_:_:)

Sets the callback for an asynchronous query.

## Declaration

```swift
func ODQuerySetCallback(_ query: ODQueryRef!, _ callback: ODQueryCallback!, _ userInfo: UnsafeMutableRawPointer!)
```

## Parameters

- `query`: The query.
- `callback`: The callback function.
- `userInfo`: A user-defined pointer to be passed back to the callback function.

## See Also

### Related Documentation

- [ODQueryCallback](opendirectory/odquerycallback.md)

### Working with Queries

- [ODQueryCopyResults(_:_:_:)](opendirectory/odquerycopyresults(_:_:_:).md)
- [ODQueryCreateWithNode(_:_:_:_:_:_:_:_:_:)](opendirectory/odquerycreatewithnode(_:_:_:_:_:_:_:_:_:).md)
- [ODQueryCreateWithNodeType(_:_:_:_:_:_:_:_:_:)](opendirectory/odquerycreatewithnodetype(_:_:_:_:_:_:_:_:_:).md)
- [ODQueryGetTypeID()](opendirectory/odquerygettypeid().md)
- [ODQueryScheduleWithRunLoop(_:_:_:)](opendirectory/odqueryschedulewithrunloop(_:_:_:).md)
- [ODQuerySetDispatchQueue(_:_:)](opendirectory/odquerysetdispatchqueue(_:_:).md)
- [ODQuerySynchronize(_:)](opendirectory/odquerysynchronize(_:).md)
- [ODQueryUnscheduleFromRunLoop(_:_:_:)](opendirectory/odqueryunschedulefromrunloop(_:_:_:).md)
