SCardListReaders (Windows CE 5.0)

Send Feedback

This function provides the list of readers within a set of named reader groups, eliminating duplicates.

The caller supplies a list of reader groups, and receives the list of readers within the named groups. Unrecognized group names are ignored.

LONG SCardListReaders(SCARDCONTEXThContext, LPCTSTRmszGroups, LPTSTRmszReaders, LPDWORDpcchReaders);

Parameters

  • hContext
    [in] 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 toward a specific context.
  • mszGroups
    [in] Supplies the names of the reader groups defined to the system as a multi-string. For Windows CE, set to NULL to list all readers in the system (that is, the SCard$AllReaders group).
  • mszReaders
    [out] Receives a multi-string that lists the card readers within the supplied reader groups. If this value is NULL, SCardListReaders ignores the buffer length supplied in pcchReaders, writes the length of the buffer that would have been returned if this parameter had not been NULL to pcchReaders, and returns a success code.
  • pcchReaders
    [in, out] Pointer to the length, in characters, of the mszReaders buffer. This parameter receives the actual length of the multi-string structure, including all trailing null characters. If the buffer length is specified as SCARD_AUTOALLOCATE, mszReaders is converted to a byte pointer, and receives the address of a block of memory containing the multi-string structure. This block of memory must be deallocated with SCardFreeMemory.

Return Values

The following table shows the possible return values.

Value Description
SCARD_S_SUCCESS Succeeds
An error value (see Smart Card Error Values for a list of all error values). Fails

Remarks

SCardListReaders is a database query function.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Winscard.h.
Link Library: Winscard.lib.

See Also

SCardEstablishContext | SCardGetProviderId | SCardListCards | SCardListInterfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.