<!--
{
  "availability" : [
    "DriverKit: 21.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BlockStorageDeviceDriverKit",
  "identifier" : "/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/ReportWriteProtection",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BlockStorageDeviceDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserBlockStorageDevice@F@ReportWriteProtection#*b#"
  },
  "title" : "ReportWriteProtection"
}
-->

# ReportWriteProtection

Returns a Boolean value that indicates whether the media is write protected, in response to a call from the framework.

```
virtual kern_return_t ReportWriteProtection(bool *isWriteProtected);
```

## Parameters

`isWriteProtected`

An in/out Boolean parameter. On output, set this to `true` if the media is write-protected.

## Return Value

A value that indicates the report-write-protection result. Return <doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> to inidicate success. To indicate a failure, see <doc://com.apple.documentation/documentation/iokit/iokit_constants> for error definitions.

---

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)