Partager via


SCardListReaders

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(
  SCARDCONTEXT hContext, 
  LPCTSTR mszGroups, 
  LPTSTR mszReaders, 
  LPDWORD pcchReaders 
);

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; receives the actual length of the multi-string structure, including all trailing Null characters.

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

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.