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_S_SUCCESS ||Successful. |
|SCARD_E_INVALID_HANDLE ||Invalid Scope Handle. |
|SCARD_E_INSUFFICIENT_BUFFER ||Reader buffer not large enough.|
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 273 of file winscard_scf.c.
References SCardLockThread(), and SCardUnlockThread().