NdisWriteEventLogEntry logs an event to the Win32 event log.
NDIS_STATUS
NdisWriteEventLogEntry(
IN PVOID LogHandle,
IN NDIS_STATUS EventCode,
IN ULONG UniqueEventValue,
IN USHORT NumStrings,
IN PVOID StringsList OPTIONAL,
IN ULONG DataSize,
IN PVOID Data OPTIONAL
);
NdisWriteEventLogEntry can return one of the following values:
Declared in Ndis.h. Include Ndis.h.
NdisWriteEventLogEntry allocates an I/O error log record, fills in the record with the supplied information about the event, and then writes the record to the I/O error log file. A user can view the logged event, including an optional description of the event and/or optional binary dump data, with the Win32 event viewer.
The NT error-logging thread uses any strings supplied in the optional StringsList to fill in messages written into the Win32 event log. Each string must be a NUL-terminated Unicode string. The I/O Manager assumes that the initial string is either the name of the driver reporting the error or the name of the device that caused the error.
The Unicode strings supplied by the caller should be read from the registry or should be language-independent (that is, the strings should be the same in any language — for example, the string could be a file name).
Caller-supplied dump data can be any binary data (such as register values) that is useful in understanding the event. The caller does not have to pad the binary data. If necessary, NdisWriteEventLogEntry pads the binary dump data so that the final data size is a multiple integral of sizeof(ULONG).
The system limits the total size of the optional data supplied to NdisWriteEventLogEntry. The combined size of the strings list and the (possibly padded) binary dump must be less than or equal to MAX_EVENT_LOG_DATA_SIZE.
NdisWriteEventLogEntry is called only by protocol drivers. Miniport drivers should call NdisWriteErrorLogEntry to log events and errors.
Callers of NdisWriteEventLogEntry run at IRQL <= DISPATCH_LEVEL.
MiniportInitialize, MiniportReset, NdisMSetAttributes, NdisMSetAttributesEx, NdisWriteErrorLogEntry