Hello Peter Wieland:
Yes, if driver doesn??t trigger media change, smartcard class library won??t
add those 2 error logs. But how about other cases, like vendor specific
IOCTLs, sometime, driver need to return error type return value, in this
case, I??d like to add our own error message into EventView. But still got
those 2 kinds of error logs added.
BTW: Reply Peter A. I have registered my driver for event logging in INF
file.
Best Regards
Haikun
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: 2006??8??28?? 23:00
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Windows smart card reader driver issue
I suspect the only way you could keep the two error log entries from being
logged by the system (i presume the first one is from the smartcard class
library?) would be to not trigger a media change in the case when the user
inserts the card backwards.
I would have thought that a reader would signal insertion when it noticed
contact with the chip on the card, not just because a piece of plastic was
inserted into the slot.
-p
From: xxxxx@lists.osr.com on behalf of Haikun Hou
Sent: Mon 8/28/2006 12:29 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Windows smart card reader driver issue
Hello Peter:
I could log my own error message by kernel API
IoAllocateErrorLogEntry/IoWriteErrorLogEntry in the driver. But those 2
error records also added. I hope that only my own error message logged, but
not those Unknow or SCardSvr.
Quote the error log codes of my driver:
PIO_ERROR_LOG_PACKET ErrorLogEntry =
(PIO_ERROR_LOG_PACKET)IoAllocateErrorLogEntry(
SmartcardExtension->ReaderExtension->pDO,ERROR_LOG_MAXIMUM_SIZE );
ErrorLogEntry->ErrorCode = STATUS_UNRECOGNIZED_MEDIA_ERRORCODE;
ErrorLogEntry->FinalStatus = STATUS_UNRECOGNIZED_MEDIA;
IoWriteErrorLogEntry( ErrorLogEntry );
return STATUS_UNRECOGNIZED_MEDIA;
// return STATUS_UNRECOGNIZED_MEDIA_ERRORCODE;
// Change to this also got same result
Anyway, thank for your attention!
Best Regards
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: 2006??8??28?? 14:23
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Windows smart card reader driver issue
I would imagine that you could log your own error through the kernel event
log APIs.
-p
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.
com] On Behalf Of Haikun Hou
Sent: Sunday, August 27, 2006 11:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Windows smart card reader driver issue
I have a question during smart card reader driver development, but I
couldn??t find any associated docs from Microsoft and web search. I really
hope that any one can give directions to me. Thanks in advance!
Smart card reader driver will return STATUS_UNRECOGNIZED_MEDIA to SC Manager
when user inserts card BACKWARD. On WinXP OS, in this case, if open Event
Viewer, we can find 2 error records added into system event log. One event
source is reader driver service, another is SCardSvr.
Here is error information of the event logs:
Reader driver service source: ??The description for Event ID (0) in Source (
DriverServiceName ) cannot be found. The local computer may not have the
necessary registry information or message DLL files to display messages from
a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve
this description; see Help and Support for details. The following
information is part of the event: , IOCTL POWER failed with status
0xc0000014.??
SCardSvr: ??Smart Card Reader ‘ReaderName 0’ rejected IOCTL POWER: The smart
card is not responding to a reset.??
Could driver change the error information (Red Message) to vendor defined
message? I have tried MC files, but since STATUS_UNRECOGNIZED_MEDIA is a
standard PC/SC return value, to redefine it will get compile error. Even if
I avoid the compile error, system still doesn??t accept vendor defined
message. Is there any Microsoft doc to describe this issue? For some
vendor-specific IOCTL in the reader driver, it will return error type return
code to PC/SC Manager as well; in this case, it will also add error logs
into EventView. I think it is same issue
Best Regards
Haikun
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer