Microsoft Windows CE 3.0  

SmartcardInitialize

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The SmartcardInitializefunction allocates internal buffers for the library.

NTSTATUS SmartcardInitialize(
PSMARTCARD_EXTENSION
SmartcardExtension
);

Parameters

SmartcardExtension
Points to the smart card extension of the device. The SmartcardExtension->SmartcardRequest.BufferSizemember 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.BufferSizemember 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

SmartcardInitializereturns 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.Bufferand receiving SmartcardExtension->SmartcardReply.Bufferdata. SmartcardInitializeallocates these buffers. Call SmartcardExitin your DriverUnloadroutine 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_EXTENSIONstructure. Before calling SmartcardInitialize, the driver must assign to the Versionmember of SMARTCARD_EXTENSIONthe value SMCLIB_VERSION. This is usually done in the driver's Initroutine.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 3.0 and later      
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.


 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.