ConfigFormatFunc

BOOLEAN
ConfigFormatFunc(
PDEVICE_INFO
pDevInfo,
PCONFIG_INFO
pConfig
);

The ConfigFormatFunc function sets video data format characteristics within a kernel-mode video capture driver. The function is provided by the driver, and the ConfigFormatFunc name is a placeholder for a driver-specified function name.

Parameters

pDevInfo

Pointer to the DEVICE_INFO structure returned by VC_Init.

pConfig

Pointer to a CONFIG_INFO structure.

Return Value

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

Comments

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

A kernel-mode driver typically uses its ConfigFormatFunc function to set format-based information, such as color translation table contents, scaling parameters, and image size, based on information that the user-mode driver has provided in the CONFIG_INFO structure. The function should also call VC_SetImageSize to notify VCKkernel.lib of the maximum image size.

Support for a ConfigFormatFunc function is required. The driver must place the address of its ConfigFormatFunc function in the VC_CALLBACK structure supplied by VCKernel.lib. If a driver that does not provide a ConfigFormatFunc function receives an IOCTL_VIDC_CONFIG_FORMAT control code, VCKernel.lib sets the Win32 error code value to STATUS_INVALID_DEVICE_REQUEST.