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

LONG SCardListReaders ( SCARDCONTEXT  hContext,
LPCTSTR  mszGroups,
LPTSTR  mszReaders,
LPDWORD  pcchReaders 

This function returns a list of currently available readers on the system. mszReaders is a pointer to a character string that is allocated by the application. If the application sends mszGroups and mszReaders as NULL then this function will return the size of the buffer needed to allocate in pcchReaders.

[in] hContext Connection context to the PC/SC Resource Manager.
[in] mszGroups List of groups to list readers (not used).
[out] mszReaders Multi-string with list of readers.
pcchReaders [inout] Size of multi-string buffer including NULL's.
Connection status.
Return values:
SCARD_E_INVALID_HANDLE Invalid Scope Handle.
SCARD_E_INSUFFICIENT_BUFFER Reader buffer not large enough.
 LPTSTR mszReaders;
 DWORD dwReaders;
 LONG rv;
 rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
 rv = SCardListReaders(hContext, NULL, NULL, &dwReaders);
 mszReaders = (LPTSTR)malloc(sizeof(char)*dwReaders);
 rv = SCardListReaders(hContext, NULL, mszReaders, &dwReaders); 

Definition at line 1518 of file winscard.c.

References psContextMap, SCardCheckDaemonAvailability(), SCardGetContextIndice(), SCardLockThread(), SCardUnlockThread(), SYS_MutexLock(), and SYS_MutexUnLock().

       * Client side function
      return SCARD_S_SUCCESS;

Generated by  Doxygen 1.6.0   Back to index