---
title: CopyMemory
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/iodataqueuedispatchsource/copymemory
---

# CopyMemory

A private method that the dispatch source uses to copy memory.

## Declaration

```occ
virtual kern_return_t CopyMemory(IOMemoryDescriptor **memory);
```

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## See Also

### Performing Internal Tasks

- [CopyDataAvailableHandler](driverkit/iodataqueuedispatchsource/copydataavailablehandler.md)
- [CopyDataServicedHandler](driverkit/iodataqueuedispatchsource/copydataservicedhandler.md)
- [CheckForWork](driverkit/iodataqueuedispatchsource/checkforwork.md)
