SmartcardCompleteRequest (VxD)

The SmartcardCompleteRequest function informs the caller of the completion of a request, unlocks memory, and enables further calls to the smart card library.

VOID 
SmartcardCompleteRequest(
  IN PSMARTCARD_EXTENSION SmartcardExtension
);
 

Parameters

SmartcardExtension
Points to the smart card structure of the driver.

Remarks

Use this function to inform the caller and the smart card library that a pending smart card I/O has been finished. If your driver is unable to satisfy a request immediately and one of your callbacks returns STATUS_PENDING, you must call this function at the end of the I/O with the reader. Use the structure member SmartcardExtension->IoRequest when you want to access the caller's memory area. This function automatically unlocks memory that was locked before the callback function was called. The following simplified example illustrates the use of this function:

DriverTransmitCallback(
    PSMARTCARD_EXTENSION SmartcardExtension
    )
{
    // Write data to the reader
    WriteDataToReader();

    // The reader will interrupt when data is available
    return STATUS_PENDING;
}

DriverInterrupt(..)
{
    // store incoming data into SmartcardExtension->IoRequest->ReplyBuffer
    ReadDataFromReader();
    
    // Now we're done with this request and can complete it.
    SmartcardCompleteRequest(SmartcardExtension);
}
 

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