Mounir IDRASSI mounir.idrassi@idrix.fr writes:
+/*
- pcsc-lite functions pointers
- */
+typedef LONG (*SCardEstablishContextPtr)(DWORD dwScope,LPCVOID pvReserved1,
- LPCVOID pvReserved2, LPSCARDCONTEXT phContext);
+typedef LONG (*SCardReleaseContextPtr)(SCARDCONTEXT hContext); +typedef LONG (*SCardIsValidContextPtr)(SCARDCONTEXT hContext); +typedef LONG (*SCardSetTimeoutPtr)(SCARDCONTEXT hContext, DWORD dwTimeout); +typedef LONG (*SCardConnectPtr)(SCARDCONTEXT hContext,LPCSTR szReader,DWORD dwShareMode,
- DWORD dwPreferredProtocols,LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol);
+typedef LONG (*SCardReconnectPtr)(SCARDHANDLE hCard,DWORD dwShareMode,
- DWORD dwPreferredProtocols,DWORD dwInitialization, LPDWORD pdwActiveProtocol);
+typedef LONG (*SCardDisconnectPtr)(SCARDHANDLE hCard, DWORD dwDisposition); +typedef LONG (*SCardBeginTransactionPtr)(SCARDHANDLE hCard); +typedef LONG (*SCardEndTransactionPtr)(SCARDHANDLE hCard, DWORD dwDisposition); +typedef LONG (*SCardCancelTransactionPtr)(SCARDHANDLE hCard); +typedef LONG (*SCardStatusPtr)(SCARDHANDLE hCard,LPSTR mszReaderNames, LPDWORD pcchReaderLen,
- LPDWORD pdwState,LPDWORD pdwProtocol,BYTE* pbAtr,LPDWORD pcbAtrLen);
+typedef LONG (*SCardGetStatusChangePtr)(SCARDCONTEXT hContext,DWORD dwTimeout,
- LPSCARD_READERSTATEA rgReaderStates, DWORD cReaders);
+typedef LONG (*SCardControlPtr)(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer,
- DWORD cbSendLength,LPVOID pbRecvBuffer, DWORD cbRecvLength, LPDWORD lpBytesReturned);
+typedef LONG (*SCardTransmitPtr)(SCARDHANDLE hCard,LPCSCARD_IO_REQUEST pioSendPci,
- const BYTE* pbSendBuffer, DWORD cbSendLength,
- LPSCARD_IO_REQUEST pioRecvPci, BYTE* pbRecvBuffer, LPDWORD pcbRecvLength);
+typedef LONG (*SCardListReaderGroupsPtr)(SCARDCONTEXT hContext,LPSTR mszGroups, LPDWORD pcchGroups); +typedef LONG (*SCardListReadersPtr)(SCARDCONTEXT hContext,LPCSTR mszGroups,
- LPSTR mszReaders, LPDWORD pcchReaders);
+typedef LONG (*SCardCancelPtr)(SCARDCONTEXT hContext); +typedef LONG (*SCardGetAttribPtr)(SCARDHANDLE hCard, DWORD dwAttrId,BYTE* pbAttr, LPDWORD pcbAttrLen); +typedef LONG (*SCardSetAttribPtr)(SCARDHANDLE hCard, DWORD dwAttrId,const BYTE* pbAttr, DWORD cbAttrLen);
I don't think the pcsc-lite library is guaranteed to be binary compatible with the Windows definitions. You'll need to include the correct headers and convert data types between Windows and Unix definitions.