VIDEO_HW_INITIALIZATION_DATA

typedef struct _VIDEO_HW_INITIALIZATION_DATA {

ULONG HwInitDataSize;

INTERFACE_TYPE AdapterInterfaceType;

PVIDEO_HW_FIND_ADAPTER HwFindAdapter;

PVIDEO_HW_INITIALIZE HwInitialize;

PVIDEO_HW_INTERRUPT HwInterrupt;

PVIDEO_HW_START_IO HwStartIO;

ULONG HwDeviceExtensionSize;

ULONG StartingDeviceNumber;

PVIDEO_HW_RESET_HW HwResetHw;

PVIDEO_HW_TIMER HwTimer;

} VIDEO_HW_INITIALIZATION_DATA, *PVIDEO_HW_INITIALIZATION_DATA;

VIDEO_HW_INITIALIZATION_DATA is a structure created (on the stack) and initialized by the miniport driver in its DriverEntry function. It specifies the entry points and storage requirements for the miniport driver.

Members

HwInitDataSize

Is the size in bytes of this structure. In effect, this indicates the version of VIDEO_HW_INITIALIZATION_DATA being used.

AdapterInterfaceType

Specifies the type of I/O bus used by the video hardware. Currently, the value can be one of the following:

Internal
Isa
Eisa
MicroChannel
TurboChannel
PCIBus

However, additional types of I/O buses will be supported in future versions of Windows NT. The upper bound on the system-defined AdapterInterfaceType values is always MaximumInterfaceType.

HwFindAdapter

Points to the miniport's HwVidFindAdapter function, which is required for all miniport drivers.

HwInitialize

Points to the miniport's HwVidInitialize function, which is required for all miniport drivers.

HwInterrupt

Points to the miniport's HwVidInterrupt function, which is required only if the miniport's adapter generates interrupts. If not, this pointer must be NULL.

HwStartIO

Points to the miniport driver's HwVidStartIO function, which is required for all miniport drivers.

HwDeviceExtensionSize

Specifies the size in bytes of the storage the miniport driver requires for its private, adapter-specific device extension. A miniport driver uses this storage to hold driver-determined per-adapter information, such as the mapped logical address ranges for the adapter registers and whatever context information the driver maintains about its I/O operations.

A pointer to the device extension is passed in every call made to the miniport driver's standard functions except DriverEntry, HwVidSynchronizeExecutionCallback, and any SvgaHwIoPortXxx. The video port driver allocates the memory for the device extension and initializes it with zeros before it is passed to the miniport's HwVidFindAdapter function.

StartingDeviceNumber

Set this to zero for the initial call to VideoPortInitialize for each type of I/O bus. Device numbering is used to determine which ..\DeviceNumber subkey of the ..CurrentControlSet\Services\DriverName key in the registry contains the adapter-specific parameters to the miniport driver. The starting number is automatically incremented if the miniport driver's HwVidFindAdapter function is called more than once for adapters on a particular I/O bus because HwVidFindAdapter returned control with the Again parameter set to TRUE.

HwResetHw

Points to the miniport's HwVidResetHw function, which is required for any miniport driver of an adapter that does not reset fully on a soft reboot of the machine. Drivers of SVGA adapters that are fully reset to a VGA standard character mode on receipt of an INT10, MODE3-type command usually set this to NULL.

HwTimer

Points to a miniport's HwVidTimer function, which is optional. This pointer can be NULL.

Comments

A miniport's DriverEntry function must initialize this structure with zeros before it sets relevant values in any member.

See Also

EMULATOR_ACCESS_ENTRY, HwVidFindAdapter, HwVidInitialize, HwVidInterrupt, HwVidResetHw, HwVidStartIO, HwVidSynchronizeExecutionCallback, HwVidTimer, SvgaHwIoPortXxx, VIDEO_ACCESS_RANGE, VIDEO_PORT_CONFIG_INFO, VideoPortZeroMemory