其中的errorLogEntry->ErrorCode = 100会在

 

------------------------------------------------------------------

void Test(PDRIVER_OBJECT pDriverObject)
{
	KdPrint(("Test()!\n"));

	PIO_ERROR_LOG_PACKET errorLogEntry = (PIO_ERROR_LOG_PACKET)
		IoAllocateErrorLogEntry(pDriverObject,
			(UCHAR) sizeof(IO_ERROR_LOG_PACKET));

    if (errorLogEntry) {
        errorLogEntry->ErrorCode = 100;
        errorLogEntry->DumpDataSize = 0;
        errorLogEntry->SequenceNumber = 0;
        errorLogEntry->MajorFunctionCode = 0;
        errorLogEntry->IoControlCode = 0;
        errorLogEntry->RetryCount = 0;
        errorLogEntry->UniqueErrorValue = 0;
        errorLogEntry->FinalStatus =  STATUS_DEVICE_NOT_CONNECTED;

        IoWriteErrorLogEntry(errorLogEntry);
		IoFreeErrorLogEntry(errorLogEntry);
		errorLogEntry = NULL;
    }
}

------------------------------------------------------------------

驱动程序中使用系统日志

相关文章:

  • 2021-12-07
  • 2021-12-10
  • 2021-10-11
  • 2022-12-23
  • 2021-08-02
  • 2021-09-04
  • 2021-05-25
猜你喜欢
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2021-12-06
  • 2021-12-07
  • 2021-12-11
  • 2021-08-10
相关资源
相似解决方案