SmartcardLogError (WDM)

The SmartcardLogError function writes an error message to the event log.

VOID 
SmartcardLogError(
  IN PVOID Object,
  IN NTSTATUS ErrorCode,
  IN PUNICODE_STRING Insertion,
  IN ULONG DumpData
);

Parameters

Object
Points either to the driver object, before you have created a device object, or to your device object.
ErrorCode
Error code of a function.
Insertion
An insertion string to be written to the event log. Your message file must have a place holder for the insertion. For example, serial port %2 is either not available or used by another device. In this example, %2 will be replaced by the insertion string. Note that %1 is reserved for the file name.
DumpData
A ULONG that appears in the data window of the event log.

Remarks

SmartcardLogError provides a convenient way to write error messages to the system event log. Refer to Preparing Event Logging on Windows NT for information on how to set up event logging.

This function is not available when developing VxD drivers. For a list of the functions that can be used, see VxD Driver Functions.