Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

LONG SCardListReaderGroups ( SCARDCONTEXT  hContext,
LPSTR  mszGroups,
LPDWORD  pcchGroups 

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".

[in] hContext Connection context to the PC/SC Resource Manager.
[out] mszGroups List of groups to list readers.
pcchGroups [inout] Size of multi-string buffer including NULL's.
Error code.
Return values:
SCARD_E_INVALID_HANDLE Invalid Scope Handle.
SCARD_E_INSUFFICIENT_BUFFER Reader buffer not large enough.
 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);

Definition at line 1156 of file winscard_scf.c.

References SCardLockThread(), and SCardUnlockThread().

      long rv;

      rv = SCardListReaderGroupsTH(hContext, mszGroups, pcchGroups);

      return rv;

Generated by  Doxygen 1.6.0   Back to index