VC_CloseDevice

VOID
VC_CloseDevice(
VCUSER_HANDLE
 vh
);

The VC_CloseDevice function closes a video capture device that was previously opened with VC_OpenDevice.

Parameters
vh
Handle to the kernel-mode driver, obtained from VC_OpenDevice.
Return Value

None.

Comments

The VC_CloseDevice function closes the kernel-mode driver handle that was obtained with VC_OpenDevice. It also removes the worker thread and event handles that VCUser.lib creates for internal use when the driver calls VC_OpenDevice.

A user-mode driver should call VC_CloseDevice when it receives a DRV_CLOSE message. Typically, the driver receives multiple DRV_CLOSE messages, because DRV_CLOSE is sent each time the client closes one of the video channels (VIDEO_EXTERNALIN, VIDEO_IN, VIDEO_OUT, or VIDEO_EXTERNALOUT). The driver only needs to call VC_CloseDevice for the client’s last DRV_CLOSE message, as illustrated by the sample video capture drivers.