Problem in updating SmartcardExtension->IoRequest.Information.

  • Thread starter Thread starter Eshanye_kp
  • Start date Start date
E

Eshanye_kp

Hi,

I'm writing a smart card reader driver on WXP using ddk 3790. As per the
ddk vendor specific IOCTLS can be handled by providing a call back for
RDF_IOCTL_VENDOR. Indeed it works. The ddk mentions, in the call back
handler, SmartcardExtension->MajorIoControlCode,
SmartcardExtension->IoRequest.RequestBuffer,
SmartcardExtension->IoRequest.ReplyBuffer and lengths from
smartcardExtension should be used instead of the actual IRP from the
IrpStack. Everything works except the
SmartcardExtension->IoRequest.Information. This is declared as a PULONG.
Hence, if i just update the info line
*(SmartcardExtension->IoRequest.Information) = info, the machine
crashes. If i use SmartcardExtension->IoRequest.Information = &info, the
application gets the values as 0 in DeviceIoControl(). Finally extracted
the IRP from SmartcardExtension->OsData->CurrentIrp and updated the info
in Irp->IoStatus.Information = info. If i do this then the application
is getting the proper value in the ReturnedBytes. Returning the status
works properly as described in the DDK. Is there any issue with the
Information updation in SmartcardExtension->IoRequest.Information ?

Regards
Esha
 
I don't think there is any issue. I see several drivers in the source tree
using it.

BTW, you can write your smartcard driver in KMDF. I ported the PSCR sample
from the WDK to KMDF last week and got it to work. If you are interested,
please send me an email.
 
Back
Top