---
title: ReportWriteProtection
framework: BlockStorageDeviceDriverKit
role: symbol
role_heading: Instance Method
platforms: [driverkit 21.0+]
path: blockstoragedevicedriverkit/iouserblockstoragedevice/reportwriteprotection
---

# ReportWriteProtection

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

## Declaration

```occ
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

Return Value A value that indicates the report-write-protection result. Return kIOReturnSuccess to inidicate success. To indicate a failure, see IOKit Constants for error definitions.

## See Also

### Reporting Device Capabilities

- [ReportEjectability](blockstoragedevicedriverkit/iouserblockstoragedevice/reportejectability.md)
- [ReportRemovability](blockstoragedevicedriverkit/iouserblockstoragedevice/reportremovability.md)
