StreamFiniFunc

BOOLEAN
StreamFiniFunc(
PDEVICE_INFO
pDevInfo
);

The StreamFiniFunc function ends a streaming operation that was initiated by the StreamInitFunc function. The function is provided by the kernel-mode driver, and the StreamFiniFunc name is a placeholder for a driver-specified function name.

Parameters

pDevInfo

Pointer to the DEVICE_INFO structure returned by VC_Init.

Return Value

Returns TRUE if the operation succeeds. Otherwise returns FALSE. If FALSE, VCKernel.lib sets the Win32 error code value to STATUS_DRIVER_INTERNAL_ERROR.

Comments

The VCKernel.lib library calls a kernel-mode driver's StreamFiniFunc function when the driver receives an IOCTL_VIDC_STREAM_FINI control code. User-mode drivers using VCUser.lib send this control code by calling VC_StreamFini.

You can assume that your driver's StreamStopFunc is called, and all pending buffers are returned to the client, before the driver's StreamFiniFunc function is called. The StreamFiniFunc function should be used to deallocate resources that were allocated by the StreamInitFunc function. If the StreamFiniFunc function does not need to perform any operations, it can just return TRUE.

Support for a StreamFiniFunc function is required, if the device and driver support capture streams. If a driver does support the function, it must place its address in the VC_CALLBACK structure supplied by VCKernel.lib. If a driver that does not support a StreamFiniFunc function receives an IOCTL_VIDC_STREAM_FINI control code, VCKernel.lib sets the Win32 error code value to STATUS_INVALID_DEVICE_REQUEST.