VideoPortInitialize
TOC
Collapse the table of content
Expand the table of content

VideoPortInitialize function

The VideoPortInitialize function performs part of the miniport driver initialization, allocating system resources for the miniport driver.

Syntax


ULONG VideoPortInitialize(
   PVOID                         Argument1,
   PVOID                         Argument2,
   PVIDEO_HW_INITIALIZATION_DATA HwInitializationData,
   PVOID                         HwContext
);

Parameters

Argument1

A pointer with which the operating system called DriverEntry of Video Miniport Driver.

Argument2

A second pointer with which the operating system called DriverEntry.

HwInitializationData

Pointer to the VIDEO_HW_INITIALIZATION_DATA structure on the stack. The miniport driver's DriverEntry routine zero-initialized this structure and then filled it in with driver-specific configuration information describing a video adapter that the miniport driver can support.

HwContext

Must be NULL.

Return value

VideoPortInitialize returns the final status of the initialization operation.

Remarks

Every video miniport driver must call VideoPortInitialize from its DriverEntry function. DriverEntry can call VideoPortInitialize only after it has first zero-initialized and then set up the VIDEO_HW_INITIALIZATION_DATA structure. VideoPortInitialize can be called only from a miniport driver's DriverEntry function.

The VideoPortInitialize function:

  • Checks the validity of the miniport driver's VIDEO_HW_INITIALIZATION_DATA specifications.

  • Allocates memory for and zero-initializes a VIDEO_PORT_CONFIG_INFO structure.

  • Fills in as much adapter configuration information as it can in VIDEO_PORT_CONFIG_INFO.

  • Fills in some of the public members of the device object created by the system to represent the graphics adapter. The video port driver manages the device objects, therefore, the miniport driver need not be concerned with device object details.

  • Allocates memory for, and zero-initializes the device extension of, the device object. A device extension is each miniport driver's primary and only global storage area for adapter-specific state information. The miniport driver specifies the size of the device extension in the HwDeviceExtensionSize member of VIDEO_HW_INITIALIZATION_DATA. The video port driver passes this device extension to most of the miniport driver functions that it calls.

  • Collects and stores pertinent information in the device extension.

The miniport driver's DriverEntry routine propagates the value returned by VideoPortInitialize back to its caller. Miniport drivers should not use this return value.

Requirements

Target platform

Version

Available in Windows 2000 and later versions of the Windows operating systems.

Header

Video.h (include Video.h)

Library

Videoprt.lib

DLL

Videoprt.sys

IRQL

PASSIVE_LEVEL

See also

DriverEntry of Video Miniport Driver
HwVidFindAdapter
HwVidInitialize
VIDEO_HW_INITIALIZATION_DATA
VIDEO_PORT_CONFIG_INFO
VideoPortZeroMemory

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft