The SmartcardInitialize function allocates internal buffers for the library.
NTSTATUS
SmartcardInitialize(
IN PSMARTCARD_EXTENSION SmartcardExtension
);
SmartcardInitialize returns an NTSTATUS value.
Value | Meaning |
---|---|
STATUS_INSUFFICIENT_RESOURCES | Out of memory |
The library uses internal buffers for sending SmartcardExtension->SmartcardRequest.Buffer and receiving SmartcardExtension->SmartcardReply.Buffer data. SmartcardInitialize allocates these buffers. Call SmartcardExit_(VxD) in your DriverUnload routine to free these internal buffers. Your driver should use those buffers for transferring data to and from the card.
The smart card driver library checks the version of the SMARTCARD_EXTENSION structure. Before calling SmartcardInitialize, the driver must assign to the Version member of SMARTCARD_EXTENSION the value SMCLIB_VERSION. This is usually done in the DriverEntry routine.
SmartcardInitialize functions the same for WDM and VxD drivers.