<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/OSData/getBytesNoCopy-53puz",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@OSData@F@getBytesNoCopy#l#l#1"
  },
  "title" : "getBytesNoCopy"
}
-->

# getBytesNoCopy

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

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

## 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

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

---

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)