Opening and Closing a Device, Using VCKernel.lib

Kernel-mode video capture drivers can provide functions for opening and closing devices. If the driver includes a DeviceOpenFunc function, then VCKernel.lib calls the function when a device is being opened. The function might enable hardware or allocate memory needed for I/O operations. The sample driver, bravado.sys, uses its DeviceOpenFunc function to obtain characteristics of the user's display device, which are placed in the registry by the user-mode driver (for details, see Opening and Closing a Device, Using VCUser.lib).

If the driver includes a DeviceCloseFunc function, VCKernel.lib calls the function when the device is being closed.