---
title: getBytesNoCopy
framework: Kernel
role: symbol
role_heading: Instance Method
platforms: [driverkit 19.0+, macOS 10.15.2+]
path: kernel/osdata/3433842-getbytesnocopy
---

# getBytesNoCopy

Returns a pointer to the OSData object's internal data buffer.

## Declaration

```occ
const void * getBytesNoCopy(size_t start, size_t numBytes);
```

```occ
virtual const void * getBytesNoCopy(unsigned int start, unsigned int numBytes);
```

## Parameters

- `start`: An offset into the OSData object.
- `numBytes`: The length of data intended to be read. If (start + numBytes) exceeds the size of the OSData's length, the call will fail.

## Return Value

Return Value A pointer to the data or NULL if the OSData does not have data for all the requested range.

## See Also

### Getting Bytes

- [getBytesNoCopy](kernel/osdata/3180879-getbytesnocopy.md)
