<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IOService/SearchProperty",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOService@F@SearchProperty#*1C#S0_#k#**$@S@OSContainer#"
  },
  "title" : "SearchProperty"
}
-->

# SearchProperty

Searches for a property with the specified name in the current service or one of its parent services, and returns the corresponding value.

```
virtual kern_return_t SearchProperty(const IOPropertyName name, const IORegistryPlaneName plane, uint64_t options, OSContainer **property);
```

## Parameters

`name`

The name of the property as a c-string.

`plane`

The name of the registry plane to search. The method uses this value only when you include [`kIOServiceSearchPropertyParents`](/documentation/DriverKit/kIOServiceSearchPropertyParents) in the `options` parameter. If you don’t include that option, you may specify `NULL` for this parameter.

`options`

Options to use during the search. Specify [`kIOServiceSearchPropertyParents`](/documentation/DriverKit/kIOServiceSearchPropertyParents) to expand the search to include all parent services. If you don’t specify [`kIOServiceSearchPropertyParents`](/documentation/DriverKit/kIOServiceSearchPropertyParents), this method looks for the property only in the current service.

`property`

A variable in which to store the value of the property. It is a programmer error to specify `NULL` for this parameter.

    If the specified property is found, this method puts the value in the provided variable; you are responsible for releasing that value. If the specified property isn’t found, this method sets the value of your variable to     `NULL`    .

## Return Value

[`kIOReturnSuccess`](/documentation/DriverKit/kIOReturnSuccess) on success, or [`kIOReturnNotFound`](/documentation/DriverKit/kIOReturnNotFound) if the property was not found.

## Discussion

This method searches for the property in the current service first, followed by any parent services when applicable. The method returns the first instance of the property it finds.

---

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)