pcsc-lite 2.3.0
libfake.c File Reference

Fake PC/SC library (example code) More...

#include "misc.h"
#include "winscard.h"

Go to the source code of this file.

Functions

LONG SCardEstablishContext (DWORD dwScope, LPCVOID pvReserved1, LPCVOID pvReserved2, LPSCARDCONTEXT phContext)
 
LONG SCardReleaseContext (SCARDCONTEXT hContext)
 
LONG SCardIsValidContext (SCARDCONTEXT hContext)
 
LONG SCardConnect (SCARDCONTEXT hContext, LPCSTR szReader, DWORD dwShareMode, DWORD dwPreferredProtocols, LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol)
 
LONG SCardReconnect (SCARDHANDLE hCard, DWORD dwShareMode, DWORD dwPreferredProtocols, DWORD dwInitialization, LPDWORD pdwActiveProtocol)
 
LONG SCardDisconnect (SCARDHANDLE hCard, DWORD dwDisposition)
 
LONG SCardBeginTransaction (SCARDHANDLE hCard)
 
LONG SCardEndTransaction (SCARDHANDLE hCard, DWORD dwDisposition)
 
LONG SCardStatus (SCARDHANDLE hCard, LPSTR mszReaderName, LPDWORD pcchReaderLen, LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen)
 
LONG SCardGetStatusChange (SCARDCONTEXT hContext, DWORD dwTimeout, SCARD_READERSTATE *rgReaderStates, DWORD cReaders)
 
LONG SCardControl (SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer, DWORD cbSendLength, LPVOID pbRecvBuffer, DWORD cbRecvLength, LPDWORD lpBytesReturned)
 
LONG SCardTransmit (SCARDHANDLE hCard, const SCARD_IO_REQUEST *pioSendPci, LPCBYTE pbSendBuffer, DWORD cbSendLength, SCARD_IO_REQUEST *pioRecvPci, LPBYTE pbRecvBuffer, LPDWORD pcbRecvLength)
 
LONG SCardListReaderGroups (SCARDCONTEXT hContext, LPSTR mszGroups, LPDWORD pcchGroups)
 
LONG SCardListReaders (SCARDCONTEXT hContext, LPCSTR mszGroups, LPSTR mszReaders, LPDWORD pcchReaders)
 
LONG SCardFreeMemory (SCARDCONTEXT hContext, LPCVOID pvMem)
 
LONG SCardCancel (SCARDCONTEXT hContext)
 
LONG SCardGetAttrib (SCARDHANDLE hCard, DWORD dwAttrId, LPBYTE pbAttr, LPDWORD pcbAttrLen)
 
LONG SCardSetAttrib (SCARDHANDLE hCard, DWORD dwAttrId, LPCBYTE pbAttr, DWORD cbAttrLen)
 

Detailed Description

Fake PC/SC library (example code)

Definition in file libfake.c.

Function Documentation

◆ SCardBeginTransaction()

LONG SCardBeginTransaction ( SCARDHANDLE hCard)

Definition at line 104 of file libfake.c.

◆ SCardCancel()

LONG SCardCancel ( SCARDCONTEXT hContext)

Definition at line 214 of file libfake.c.

◆ SCardConnect()

LONG SCardConnect ( SCARDCONTEXT hContext,
LPCSTR szReader,
DWORD dwShareMode,
DWORD dwPreferredProtocols,
LPSCARDHANDLE phCard,
LPDWORD pdwActiveProtocol )

Definition at line 66 of file libfake.c.

◆ SCardControl()

LONG SCardControl ( SCARDHANDLE hCard,
DWORD dwControlCode,
LPCVOID pbSendBuffer,
DWORD cbSendLength,
LPVOID pbRecvBuffer,
DWORD cbRecvLength,
LPDWORD lpBytesReturned )

Definition at line 150 of file libfake.c.

◆ SCardDisconnect()

LONG SCardDisconnect ( SCARDHANDLE hCard,
DWORD dwDisposition )

Definition at line 96 of file libfake.c.

◆ SCardEndTransaction()

LONG SCardEndTransaction ( SCARDHANDLE hCard,
DWORD dwDisposition )

Definition at line 111 of file libfake.c.

◆ SCardEstablishContext()

LONG SCardEstablishContext ( DWORD dwScope,
LPCVOID pvReserved1,
LPCVOID pvReserved2,
LPSCARDCONTEXT phContext )

Definition at line 40 of file libfake.c.

◆ SCardFreeMemory()

LONG SCardFreeMemory ( SCARDCONTEXT hContext,
LPCVOID pvMem )

Definition at line 206 of file libfake.c.

◆ SCardGetAttrib()

LONG SCardGetAttrib ( SCARDHANDLE hCard,
DWORD dwAttrId,
LPBYTE pbAttr,
LPDWORD pcbAttrLen )

Definition at line 221 of file libfake.c.

◆ SCardGetStatusChange()

LONG SCardGetStatusChange ( SCARDCONTEXT hContext,
DWORD dwTimeout,
SCARD_READERSTATE * rgReaderStates,
DWORD cReaders )

Definition at line 138 of file libfake.c.

◆ SCardIsValidContext()

LONG SCardIsValidContext ( SCARDCONTEXT hContext)

Definition at line 59 of file libfake.c.

◆ SCardListReaderGroups()

LONG SCardListReaderGroups ( SCARDCONTEXT hContext,
LPSTR mszGroups,
LPDWORD pcchGroups )

Definition at line 183 of file libfake.c.

◆ SCardListReaders()

LONG SCardListReaders ( SCARDCONTEXT hContext,
LPCSTR mszGroups,
LPSTR mszReaders,
LPDWORD pcchReaders )

Definition at line 193 of file libfake.c.

◆ SCardReconnect()

LONG SCardReconnect ( SCARDHANDLE hCard,
DWORD dwShareMode,
DWORD dwPreferredProtocols,
DWORD dwInitialization,
LPDWORD pdwActiveProtocol )

Definition at line 82 of file libfake.c.

◆ SCardReleaseContext()

LONG SCardReleaseContext ( SCARDCONTEXT hContext)

Definition at line 52 of file libfake.c.

◆ SCardSetAttrib()

LONG SCardSetAttrib ( SCARDHANDLE hCard,
DWORD dwAttrId,
LPCBYTE pbAttr,
DWORD cbAttrLen )

Definition at line 232 of file libfake.c.

◆ SCardStatus()

LONG SCardStatus ( SCARDHANDLE hCard,
LPSTR mszReaderName,
LPDWORD pcchReaderLen,
LPDWORD pdwState,
LPDWORD pdwProtocol,
LPBYTE pbAtr,
LPDWORD pcbAtrLen )

Definition at line 119 of file libfake.c.

◆ SCardTransmit()

LONG SCardTransmit ( SCARDHANDLE hCard,
const SCARD_IO_REQUEST * pioSendPci,
LPCBYTE pbSendBuffer,
DWORD cbSendLength,
SCARD_IO_REQUEST * pioRecvPci,
LPBYTE pbRecvBuffer,
LPDWORD pcbRecvLength )

Definition at line 166 of file libfake.c.