Bewerken

Delen via


VideoPortGetRomImage function (video.h)

Reads the device's read-only memory (ROM).

Syntax

VIDEOPORT_DEPRECATED VIDEOPORT_API PVOID VideoPortGetRomImage(
  [in] IN PVOID HwDeviceExtension,
  [in] IN PVOID Unused1,
  [in] IN ULONG Unused2,
  [in] IN ULONG Length
);

Parameters

[in] HwDeviceExtension

A pointer to the miniport driver's device extension.

[in] Unused1

Currently ignored by the video port driver; should be set to NULL.

[in] Unused2

Currently ignored by the video port driver; should be set to zero.

[in] Length

Either the number of bytes of ROM data that the video port driver should read and return, or zero.

Return value

VideoPortGetRomImage returns a pointer to a buffer containing the device's ROM (BIOS) data on success; otherwise, returns NULL to indicate either there was insufficient memory for the operation, or the device's ROM could not be accessed.

Remarks

VideoPortGetRomImage does not read ROM using the legacy 0xC0000 mapping. It reads ROM that can be discovered using the ACPI_METHOD_DISPLAY_ROM method or the ROM base address register.

The ACPI_METHOD_DISPLAY_ROM alias, defined in Dispmprt.h, represents the method used to obtain the BIOS ROM image. This method is required when the ROM image is stored in a proprietary format such as the system BIOS ROM. This method is not necessary if the ROM image can be read through a standard PCI interface.

The video port driver allocates a buffer of Length bytes and fills it with data read from the device's ROM. The video port driver always reads Length bytes from the beginning of the device's ROM.

If a miniport driver calls VideoPortGetRomImage multiple times, the video port driver will free the buffer from a previous call before allocating and returning a buffer in the current call. Consequently, a miniport driver must only reference the pointer returned by this call to VideoPortGetRomImage.

The miniport driver can free the buffer allocated by the video port driver by calling VideoPortGetRomImage with a Length of zero.

Requirements

Requirement Value
Minimum supported client Available in Windows 2000 and later versions of the Windows operating systems.
Target Platform Desktop
Header video.h (include Video.h)
Library Videoprt.lib
DLL Videoprt.sys
IRQL PASSIVE_LEVEL

See also

VideoPortScanRom