SCardListCards
This function searches the smart card database and provides a list of named cards previously introduced to the system by a user.
The caller specifies an Automatic Terminal Recognition (ATR) string, a set of globally unique identifiers (GUIDs), or both. If both an ATR string and an identifier array are supplied, the cards returned will match the ATR string supplied and support the interfaces specified.
LONG SCardListCards(IN SCARDCONTEXT hContext,
IN LPCBYTE pbAtr,
IN LPCGUID rgguidInterfaces,
IN DWORD cguidInterfaceCount,
OUT LPTSTR mszCards,
IN OUT LPDWORD pcchCards );
Parameters
- hContext
Handle to the resource manager context for the query. The resource manager context can be set by a previous call to SCardEstablishContext or set to NULL if the query is not directed towards a specific context. - pbAtr
Pointer to the address of an ATR string to compare to known cards or NULL if no ATR matching is to be performed. - rgguidInterfaces
Supplies an array of GUIDs or NULL if no interface matching is to be performed. When an array is supplied, a card name is returned only if all the specified identifiers are supported by the card. - cguidInterfaceCount
Count of entries in the rgguidInterfaces array. If rgguidInterfaces is NULL, then this value is ignored. - mszCards
Receives a multi-string that lists the smart cards found. If this value is NULL, SCardListCards ignores the buffer length supplied in pcchCards, returning the length of the buffer that would have been returned if this parameter had not been NULL to pcchCards and a success code. - pcchCards
Pointer to the length of the mszCards buffer in characters; receives the actual length of the multi-string structure, including all trailing Null characters.
Return Values
Value | Description |
---|---|
Succeeds | SCARD_S_SUCCESS |
Fails | An error value (see Smart Card Error values for a list of all error values) |
Remarks
To return all smart cards introduced to the subsystem, set pbAtr and rgguidInterfaces to NULL.
SCardListCards is a database query function.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 3.0 and later | Winscard.h | Winscard.lib |
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.
See Also
SCardEstablishContext, SCardGetProviderId, SCardListInterfaces, SCardListReaders
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.