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

winscard.c File Reference


Detailed Description

This handles smartcard reader communications. This is the heart of the M$ smartcard API.

Here are the main server-side functions which execute the requests from the clients.

Definition in file winscard.c.

#include "config.h"
#include <stdlib.h>
#include <sys/time.h>
#include <string.h>
#include "pcscd.h"
#include "winscard.h"
#include "ifdhandler.h"
#include "debuglog.h"
#include "readerfactory.h"
#include "prothandler.h"
#include "ifdwrapper.h"
#include "atrhandler.h"
#include "sys_generic.h"
#include "eventhandler.h"
#include "utils.h"

Go to the source code of this file.

Defines

#define PROFILE_END
#define PROFILE_START
#define SCARD_EXCLUSIVE_CONTEXT   -1
#define SCARD_LAST_CONTEXT   1
#define SCARD_NO_CONTEXT   0
#define SCARD_NO_LOCK   0
#define SCARD_PROTOCOL_ANY_OLD   0x1000

Functions

LONG SCardBeginTransaction (SCARDHANDLE hCard)
LONG SCardCancel (SCARDCONTEXT hContext)
LONG SCardCancelTransaction (SCARDHANDLE hCard)
LONG SCardConnect (SCARDCONTEXT hContext, LPCSTR szReader, DWORD dwShareMode, DWORD dwPreferredProtocols, LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol)
LONG SCardControl (SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer, DWORD cbSendLength, LPVOID pbRecvBuffer, DWORD cbRecvLength, LPDWORD lpBytesReturned)
LONG SCardDisconnect (SCARDHANDLE hCard, DWORD dwDisposition)
LONG SCardEndTransaction (SCARDHANDLE hCard, DWORD dwDisposition)
LONG SCardEstablishContext (DWORD dwScope, LPCVOID pvReserved1, LPCVOID pvReserved2, LPSCARDCONTEXT phContext)
 Creates an Application Context for a client.
LONG SCardGetAttrib (SCARDHANDLE hCard, DWORD dwAttrId, LPBYTE pbAttr, LPDWORD pcbAttrLen)
LONG SCardGetStatusChange (SCARDCONTEXT hContext, DWORD dwTimeout, LPSCARD_READERSTATE_A rgReaderStates, DWORD cReaders)
LONG SCardListReaders (SCARDCONTEXT hContext, LPCSTR mszGroups, LPSTR mszReaders, LPDWORD pcchReaders)
LONG SCardReconnect (SCARDHANDLE hCard, DWORD dwShareMode, DWORD dwPreferredProtocols, DWORD dwInitialization, LPDWORD pdwActiveProtocol)
LONG SCardReleaseContext (SCARDCONTEXT hContext)
LONG SCardSetAttrib (SCARDHANDLE hCard, DWORD dwAttrId, LPCBYTE pbAttr, DWORD cbAttrLen)
LONG SCardSetTimeout (SCARDCONTEXT hContext, DWORD dwTimeout)
LONG SCardStatus (SCARDHANDLE hCard, LPSTR mszReaderNames, LPDWORD pcchReaderLen, LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen)
LONG SCardTransmit (SCARDHANDLE hCard, LPCSCARD_IO_REQUEST pioSendPci, LPCBYTE pbSendBuffer, DWORD cbSendLength, LPSCARD_IO_REQUEST pioRecvPci, LPBYTE pbRecvBuffer, LPDWORD pcbRecvLength)

Variables

SCARD_IO_REQUEST g_rgSCardRawPci = { SCARD_PROTOCOL_RAW, sizeof(SCARD_IO_REQUEST) }
SCARD_IO_REQUEST g_rgSCardT0Pci = { SCARD_PROTOCOL_T0, sizeof(SCARD_IO_REQUEST) }
SCARD_IO_REQUEST g_rgSCardT1Pci = { SCARD_PROTOCOL_T1, sizeof(SCARD_IO_REQUEST) }


Generated by  Doxygen 1.6.0   Back to index