Smart Card Driver Library Callback Function Reference

The driver can set up several callback functions in the SMARTCARD_EXTENSION structure. The member ReaderFunction is an array of function pointers. Each array member is used for a specific callback. To set up one of these members, the driver has to assign a function pointer to the desired array member. For example:

SmartcardExtension->ReaderFunction[RDF_CARD_POWER] = 
DriverCardPower;
 

This sets up a callback for the card power request. When the library receives such an IOCTL code, it sets up all parameters and then calls this function. If a member function is NULL, the driver will return STATUS_NOT_SUPPORTED to the caller. This is useful, for example, if your driver does not support card ejecting or card swallowing. If you do not set up a function for these calls, the library simply returns STATUS_NOT_SUPPORTED.