BOOLEAN
VC_GetResources(
PDEVICE_INFO pDevInfo,
PDRIVER_OBJECT pDriverObject,
PUCHAR pPortBase,
ULONG NrOfPorts,
ULONG Interrupt,
BOOLEAN bLatched,
PUCHAR pFrameBuffer,
ULONG FrameLength,
);
The VC_GetResources function reserves system resources for a device, and maps the device's I/O address space and frame buffer into system address space.
Parameters
pDevInfo
Pointer to the DEVICE_INFO structure returned by VC_Init.
pDriverObject
The driver object pointer received as input to the driver's DriverEntry function.
pPortBase
Bus-relative physical base address of the device's I/O port address space.
NrOfPorts
Number of port addresses.
Interrupt
Interrupt number.
bLatched
Set to TRUE if the interrupt is latched or FALSE if the interrupt is level-sensitive.
pFrameBuffer
Bus-relative physical base address of the device's frame buffer.
FrameLength
Length of the frame buffer.
Return Value
Returns TRUE if the operation succeeds. Otherwise returns FALSE.
Comments
A kernel-mode video capture driver using VCKernel.lib must call VC_GetResources from within its DriverEntry function. The VC_GetResources function performs the following operations, in the order listed:
1.Determines the bus type.
2.Maps the device's I/O port space to system space.
3.Maps the device's frame buffer to system space.
4.Reserves the interrupt number, mapped I/O port space, and mapped frame buffer space for use by the device.
The VC_GetResources function calls HalTranslateBusAddress, MmMapIoSpace, and IoReportResourceUsage.