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

# StopDevice

Tells the driver to stop IO on an video device.

## Declaration

```occ
virtual kern_return_t StopDevice(IOUserVideoObjectID in_object_id, IOUserVideoStartStopFlags in_flags);
```

## Parameters

- `in_object_id`: IOUserVideoObjectID of the device to stop IO.
- `in_flags`: IOUserVideoStartStopFlags to indicate how IO is stopping.

## Discussion

Discussion The default implementation always returns kIOReturnSuccess. Subclass and override this method to handle any hardware specific things when IO is stopping, then call the superclass implementation to update IO state. StopIO will be called on the video device.

## See Also

### Starting and stopping the driver

- [StartDevice](videodriverkit/iouservideodriver/startdevice.md)
- [IOUserVideoObjectID](videodriverkit/videodriverkit/iouservideoobjectid.md)
- [IOUserVideoStartStopFlags](videodriverkit/videodriverkit/iouservideostartstopflags.md)
