Share via


SmartcardLogError (WDM) routine

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

Syntax

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

Parameters

  • Object [in]
    A pointer to your device object or, if you have not yet created a device object, to the driver object.

  • ErrorCode [in]
    The Microsoft Win32 error code that is returned by the routine that caused the error.

  • Insertion [in]
    A pointer to an uninitialized UNICODE_STRING that contains an insertion string to write to the event log. Your message file must contain a placeholder for this string. For example, if the message file contains the string, "Serial port %2 is not available or is being used by another device", %2 will be replaced by the insertion string. Be aware that %1 is reserved for the file name.

  • DumpData [in]
    A value that indicates the type of error that occurred. This value appears in the data window of the event log.

Return value

None

Remarks

SmartcardLogError provides a convenient way to write error messages to the system event log. For information about how to set up event logging, see Enabling Smart Card Event Logging in the Registry.

Requirements

Target platform

Desktop

Version

Available in Windows XP and later versions of Windows.

Header

Smclib.h (include Smclib.h)

Library

Smclib.lib

IRQL

<= DISPATCH_LEVEL

 

 

Send comments about this topic to Microsoft