Partager via


SCardListReaders (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

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 Embedded 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 Value

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

Header winscard.h
Library winscard.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Smart Card Functions
SCardEstablishContext
SCardGetProviderId
SCardListCards
SCardListInterfaces