#include <winscard.h>
LONG SCardListReaderGroups(SCARDCONTEXT hContext,
LPSTR mszGroups,
LPDWORD pcchGroups);
| hContext | IN | Connection context to the PC/SC Resource Manager |
| mszGroups | OUT | List of groups to list readers |
| pcchGroups | INOUT | Size of multi-string buffer including NULL's |
This function returns a list of currently available reader groups on the system. mszGroups is a pointer to a character string that is allocated by the application. If the application sends mszGroups as NULL then this function will return the size of the buffer needed to allocate in pcchGroups.
The group names is a multi-string and separated by a nul character
('\0') and ended by a double nul character.
"SCard$DefaultReaders\0Group 2\0\0".
SCARDCONTEXT hContext; LPSTR mszGroups; DWORD dwGroups; LONG rv; rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext); rv = SCardListReaderGroups(hContext, NULL, &dwGroups); mszGroups = malloc(sizeof(char)*dwGroups); rv = SCardListReaderGroups(hContext, mszGroups, &dwGroups);
| SCARD_S_SUCCESS | Successful |
| SCARD_E_INVALID_HANDLE | Invalid Scope Handle |
| SCARD_E_INSUFFICIENT_BUFFER | Reader buffer not large enough |