---
title: AddObject
framework: VideoDriverKit
role: symbol
role_heading: Instance Method
platforms: [driverkit 27.0+]
path: videodriverkit/iouservideodriver/addobject
---

# AddObject

Adds a video object to the driver.

## Declaration

```occ
kern_return_t AddObject(IOUserVideoObject *in_object);
```

## Parameters

- `in_object`: The video object being added to the driver.

## Return Value

Return Value kIOReturnSuccess if object was successfully added.

## Discussion

Discussion All objects that need to be managed by the host needs to be added to the driver. The objects’s reference count will be incremented if it was successfully added. Caller should also call PropertiesChanged() as necessary to notify host of any changes.

## See Also

### Working with video objects

- [RemoveObject](videodriverkit/iouservideodriver/removeobject.md)
- [IOUserVideoObject](videodriverkit/iouservideoobject.md)
- [GetVideoObjectForObjectID](videodriverkit/iouservideodriver/getvideoobjectforobjectid.md)
