PDEVICE_INFO
VC_Init(
PDRIVER_OBJECT pDriverObject,
PUNICODE_STRING szRegistryPathName,
ULONG HWInfoSize
);
The VC_Init function creates a device object and stores the device name in the registry.
Returns a pointer to a DEVICE_INFO structure.
A kernel-mode video capture driver using VCKernel.lib must call VC_Init from within its DriverEntry function, before calling any other VCKernel.lib functions.
The DEVICE_INFO structure pointer returned by VC_Init is used as input to subsequent calls to other VCKernel.lib functions. Contents of the DEVICE_INFO structure are not available to the kernel-mode driver.
The driver uses the HWInfoSize parameter to specify the size of a driver-defined structure. The VC_Init function allocates nonpaged space for this structure within the device object’s device extension area. The driver can call VC_GetHWInfo to obtain the address of the area that was allocated for the structure. Drivers can use this structure to store device-specific context information. (For more information about device objects and device extensions, see the Kernel-Mode Drivers Design Guide.)
The VC_Init function calls IoCreateDevice to create a device object. The device’s name is “vidcap”, which is defined by DD_VIDCAP_DEVICE_NAME_U in ntddvidc.h, with an appended number (0, 1, 2, and so on). The function writes this device name into the registry, under the registry path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DriverName\Parameters, where DriverName is the driver name that the user-mode driver specified as input to VC_OpenProfileAccess when it installed the kernel-mode driver.