共用方式為


pHalQuerySystemInformation 回調函式 (ntddk.h)

pHalQuerySystemInformation 回呼函式會讀取 MCA 銀行的狀態緩存器。

語法

pHalQuerySystemInformation Phalquerysysteminformation;

NTSTATUS Phalquerysysteminformation(
  [in]  HAL_QUERY_INFORMATION_CLASS InformationClass,
  [in]  ULONG BufferSize,
  [out] PVOID Buffer,
  [out] PULONG ReturnedLength
)
{...}

參數

[in] InformationClass

要讀取目前 MCA 錯誤記錄檔的 HalMcaLogInformation。 如果找到任何未更正的計算機檢查錯誤,則會在緩衝區中傳回。 針對Itanium系統,指定 HalCmcLogInformation 以讀取目前更正的 CPU 錯誤記錄檔和 HalCpeLogInformation,以讀取目前更正的平臺錯誤記錄檔。

[in] BufferSize

呼叫端提供的緩衝區大小,以位元組為單位。

[out] Buffer

MCA_EXCEPTION類型之呼叫端提供的緩衝區指標,其中包含這個例程所傳回的資訊。 針對 Intel Itanium 處理器,傳回的資訊至少必須符合 V3.0 SAL 規格、錯誤記錄結構、2001 年 1 月附錄 B“的規範。 針對 Intel Pentium Pro 處理器,資訊如下列程式代碼範例所述。

typedef union _MCI_STATS {
  struct {
    USHORT  McaCod;
    USHORT  MsCod;
    ULONG  OtherInfo   : 25;
    ULONG  Damage    : 1;
    ULONG  AddressValid  : 1;
    ULONG  MiscValid  : 1;
    ULONG  Enabled    : 1;
    ULONG  UnCorrected  : 1;
    ULONG  OverFlow  : 1;
    ULONG  Valid    : 1;
  } MciStats;

  ULONGLONG  QuadPart;
} MCI_STATS, *PMCI_STATS;


typedef union _MCI_ADDR{
  struct {
    ULONG Address;
    ULONG Reserved;
  } MciAddr;

  ULONGLONG  QuadPart;
} MCI_ADDR, *PMCI_ADDR;


typedef struct _MCA_EXCEPTION {

  ULONG  VersionNumber;  // Version number of this record type
  MCA_EXCEPTION_TYPE  ExceptionType;  // MCA or MCE
  LARGE_INTEGER  TimeStamp;  // exception recording timestamp
  ULONG  ProcessorNumber;// processor number

  union {
    struct {
      UCHAR  BankNumber;  // bank number
      MCI_STATS  Status;  
      MCI_ADDR  Address;
      ULONGLONG  Misc;
    } Mca;

    struct {
      ULONGLONG  McAddress;  // physical address for the cycle causing the error
      ULONGLONG  McType;   // cycle specification causing the error
    } Mce;
  } u;

} MCA_EXCEPTION, *PMCA_EXCEPTION;

[out] ReturnedLength

Buffer 中傳回的位元組數目。

傳回值

如果錯誤記錄檔存在,則傳回STATUS_SUCCESS。

言論

HalQuerySystemInformation 函式會傳回第一個錯誤。 MCA 驅動程式有責任再次呼叫此例程,以查看是否有更多可用的錯誤。

Windows Vista 和更新版本的 Windows 不支援本主題中所述的電腦檢查架構 (MCA) 和電腦檢查例外狀況 (MCE) 報告類型。 透過 Windows 硬體錯誤架構 (WHEA) 支援 MCA 和 MCE 報告。

要求

要求 價值
目標平臺 桌面
標頭 ntddk.h (包括 Ntddk.h)