Share via


SmartcardInitialize (Windows CE 5.0)

Send Feedback

The SmartcardInitialize function allocates internal buffers for the library.

NTSTATUS SmartcardInitialize(PSMARTCARD_EXTENSION SmartcardExtension);

Parameters

  • SmartcardExtension
    [in] Points to the smart card extension of the device. The **SmartcardExtension->SmartcardRequest.BufferSize****member must be set to the number of bytes to be allocated for the request buffer. The minimum size for this buffer is MIN_BUFFER_SIZE. If this value is smaller, MIN_BUFFER_SIZE will be allocated automatically. The SmartcardExtension->SmartcardReply.BufferSize member must be set to the number of bytes to be allocated for the receive buffer. The minimum size for this buffer is MIN_BUFFER_SIZE. If this value is smaller, MIN_BUFFER_SIZE will be allocated automatically.

Return Values

SmartcardInitialize returns an NTSTATUS value. The value STATUS_INSUFFICIENT_RESOURCES means that there is not enough memory available to initialize the smart card.

Remarks

The library uses internal buffers for sending SmartcardExtension->SmartcardRequest.Buffer and receiving SmartcardExtension->SmartcardReply.Buffer data. SmartcardInitialize allocates these buffers. Call SmartcardExit 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 driver's Init routine.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Smclib.h.

See Also

SmartcardExit | SMARTCARD_EXTENSION

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.