Bewerken

Delen via


VideoPortLogError function (video.h)

The VideoPortLogError function logs errors to the system event log when a miniport driver detects a hardware error condition during I/O operations.

Syntax

VIDEOPORT_API VOID VideoPortLogError(
  PVOID                 HwDeviceExtension,
  PVIDEO_REQUEST_PACKET Vrp,
  VP_STATUS             ErrorCode,
  ULONG                 UniqueId
);

Parameters

HwDeviceExtension

Pointer to the miniport driver's device extension.

Vrp

[optional] Pointer to a [VIDEO_REQUEST_PACKET] structure that describes the video request packet (VRP) if one is associated with the error; otherwise NULL.

ErrorCode

Specifies a miniport driver-defined error code that indicates the type of hardware error.

UniqueId

Specifies a unique identifier for the error. This value differentiates the current error from other errors with the same ErrorCode. For some miniport drivers, this identifies the line of code where the error was detected; for others, it is a value returned by the hardware.

Return value

None

Remarks

Miniport drivers should call VideoPortLogError to notify the user if the driver encounters unusual hardware errors during normal operations. Posting such errors to the system event log warns the user that the video adapter might be failing so the user can replace (or reconfigure) the adapter before a total hardware failure occurs.

However, miniport drivers should not log errors, such as "failed to detect hardware," that occur frequently during normal operation.

VideoPortLogError can be called from a miniport driver's HwVidInterrupt or HwVidSynchronizeExecutionCallback function.

Requirements

Requirement Value
Minimum supported client Windows 2000
Target Platform Desktop
Header video.h (include Video.h)
Library Videoprt.lib
DLL Videoprt.sys
IRQL <= DIRQL

See also

VideoDebugPrint