Archived from groups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.windowsxp.device_driver.dev (More info?)
I originally posted this in the smartcards forum, but the issue is important
and I need
someone to look at it that might have experience with it.
I have encountered a problem when attempting to define an IOCTL to be used
in the aforementioned callback to my IFD handler.
The callback is entered and a special APDU (GET_CHALLENGE) is sent to the
device and a good response is received. Since the IOCTL is defined as
METHOD_BUFFERED, the request and response buffer are the same. I set the
response buffer length in *IoRequest->Information and
SmartcardReply->BufferLength and then exit the callback function. The
problem arises when the IRP is completed by SMCLIB in the kernel. I get a
BAD_POOL_HEADER (19) and BSOD. The documentation refers to using an
OVERLAPPED structure in the DeviceIoControl, but the application developer
is using SCardControl, which has no provision for a pointer to the
OVERLAPPED structure.
If I take the documentation as literal I would tell the application
programmer to use CreateFile and DeviceIoControl for this IOCTL. Is this
correct? Barring that, how is a vendor IOCTL sent down to the driver?
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.