Iowriteerrorlogentry generates Event Log

Source: Internet
Author: User

EventLog blog: http://driverentry.com.br/en/blog? P = 348

String handler: http://mzf2008.blog.163.com/blog/static/3559978620101112115510592/

1. Write the MC File

Messageidtypedef = ntstatus

Severitynames =
(
Success = 0x0: status_severity_success
Informational = 0x1: status_severity_informational
Warning = 0x2: status_severity_warning
Error = 0x3: status_severity_error
)

Facilitynames =
(
System = 0x0
Driverentrylogs = 0x2a: driverentry_facility_code
)

Export agenames =
(
English = 0x0409: msg00002
)

Messageid = 0x0001
Facility = driverentrylogs
Severity = informational
Symbolicname = evt_hello_message

Language = English
Hello world!
.

Messageid = 0x0002
Facility = driverentrylogs
Severity = warning
Symbolicname = evt_deios_message

Language = English
The % 2 deios function/module kdprint: % 3.
.

Detailed Description: msdn

Http://msdn.microsoft.com/en-us/library/windows/hardware/ff543017 (V = vs.85). aspx # ddk_compiling_the_error_message_text_file_kg

2. mc.exe generates RC, bin, and. H files from Mc files, and generates event logs using io_error_log_packet structure, ioallocateerrorlogentry, and iowriteerrorlogentry functions.

Composition of Event Log

Detailed Description: msdn

Http://msdn.microsoft.com/en-us/library/windows/hardware/ff550571 (V = vs.85). aspx

Http://msdn.microsoft.com/en-us/library/windows/hardware/ff566411 (V = vs.85). aspx

3. After the driver is loaded, you must load sys in the registry as the image file to display the log Content normally.

Detailed Description: msdn

Http://msdn.microsoft.com/en-us/library/windows/hardware/ff560866 (V = vs.85). aspx

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.