---
title: SearchProperty
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/ioservice/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.

## Declaration

```occ
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 doc://com.apple.driverkit/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 doc://com.apple.driverkit/documentation/DriverKit/kIOServiceSearchPropertyParents to expand the search to include all parent services. If you don’t specify doc://com.apple.driverkit/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

Return Value kIOReturnSuccess on success, or kIOReturnNotFound if the property was not found.

## Discussion

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.

## See Also

### Managing the Registry Properties

- [CopyProperties](driverkit/ioservice/copyproperties.md)
- [SetProperties](driverkit/ioservice/setproperties.md)
- [IOPropertyName](driverkit/iopropertyname.md)
- [IORegistryPlaneName](driverkit/ioregistryplanename.md)
- [Search Options](driverkit/3325572-search_options.md)
