SCardListReaderGroups
The SCardListReaderGroups function provides the list of reader groups that have previously been introduced to the system.
LONG SCardListReaderGroups(
IN SCARDCONTEXT hContext,
OUT LPTSTR mszGroups,
IN OUT LPDWORD pcchGroups
);
Parameters
-
hContext
-
Supplies the handle that identifies 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.
-
mszGroups
-
Receives a multi-string that lists the reader groups defined to the system and available to the current user on the current terminal. If this value is NULL, SCardListReaderGroups ignores the buffer length supplied in pcchGroups, writes the length of the buffer that would have been returned if this parameter had not been NULL to pcchGroups, and returns a success code.
-
pcchGroups
-
Supplies the length of the mszGroups buffer in characters, and receives the actual length of the multi-string structure, including all trailing Null characters. If the buffer length is specified as SCARD_AUTOALLOCATE, then mszGroups is converted to a pointer to a string 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
If the function… |
The return value is… |
Succeeds |
SCARD_S_SUCCESS. |
Fails |
An error code (see Error Codes for a list of all error codes). |
Remarks
The group SCard$DefaultReaders is returned only if it contains at least one reader.
The group SCard$AllReaders cannot be returned, since it only exists implicitly.
SCardListReaderGroups is a database query function. For a description of other database query functions, see Smart Card Database Query Functions.
QuickInfo
Windows NT: Use version 4.0 SP3 and later.
Windows: Use Windows 95 OSR2.1.
Windows CE: Unsupported.
Header: Declared in winscard.h.
Import Library: Link with winscard.lib.
See Also
SCardEstablishContext, SCardFreeMemory, SCardGetProviderId, SCardListCards, SCardListInterfaces, SCardListReaders