---
title: AddCustomProperty
framework: audiodriverkit
role: symbol
role_heading: Instance Method
path: audiodriverkit/iouseraudioobject/addcustomproperty
---

# AddCustomProperty

Adds a custom property to the audio object.

## Declaration

```occ
virtual kern_return_t AddCustomProperty(IOUserAudioCustomProperty *in_custom_property);
```

## Parameters

- `in_custom_property`: An doc://com.apple.audiodriverkit/documentation/AudioDriverKit/IOUserAudioCustomProperty object to add to the doc://com.apple.audiodriverkit/documentation/AudioDriverKit/IOUserAudioObject.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. For a list of error codes, see Error Codes.

## See Also

### Using Custom Properties

- [RemoveCustomProperty](audiodriverkit/iouseraudioobject/removecustomproperty.md)
- [IOUserAudioCustomProperty](audiodriverkit/iouseraudiocustomproperty.md)
