alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (winscard.h)

This example Java source code file (winscard.h) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

dword, long, lpbyte, lpcbyte, lpctstr, lpcvoid, lpdword, lpscard_readerstate_a, lptstr, scarddisconnect, scardgetattrib, scardgetstatuschange, scardstatus, scardtransmit

The winscard.h Java example source code

/*
 * This handles smartcard reader communications.
 *
 * MUSCLE SmartCard Development ( http://www.linuxnet.com )
 *
 * Copyright (C) 1999-2003
 *  David Corcoran <corcoran@linuxnet.com>
 *  Ludovic Rousseau <ludovic.rousseau@free.fr>
 *
 * $Id: winscard.h,v 1.13 2004/08/06 12:12:19 rousseau Exp $
 */

#ifndef __winscard_h__
#define __winscard_h__

#include <pcsclite.h>

#ifdef __cplusplus
extern "C"
{
#endif

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

        LONG SCardReleaseContext(SCARDCONTEXT hContext);

        LONG SCardSetTimeout(SCARDCONTEXT hContext, DWORD dwTimeout);

        LONG SCardConnect(SCARDCONTEXT hContext,
                LPCTSTR 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 SCardCancelTransaction(SCARDHANDLE hCard);

        LONG SCardStatus(SCARDHANDLE hCard,
                LPTSTR mszReaderNames, LPDWORD pcchReaderLen,
                LPDWORD pdwState,
                LPDWORD pdwProtocol,
                LPBYTE pbAtr, LPDWORD pcbAtrLen);

        LONG SCardGetStatusChange(SCARDCONTEXT hContext,
                DWORD dwTimeout,
                LPSCARD_READERSTATE_A rgReaderStates, DWORD cReaders);

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

        LONG SCardTransmit(SCARDHANDLE hCard,
                LPCSCARD_IO_REQUEST pioSendPci,
                LPCBYTE pbSendBuffer, DWORD cbSendLength,
                LPSCARD_IO_REQUEST pioRecvPci,
                LPBYTE pbRecvBuffer, LPDWORD pcbRecvLength);

        LONG SCardListReaderGroups(SCARDCONTEXT hContext,
                LPTSTR mszGroups, LPDWORD pcchGroups);

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

        LONG SCardCancel(SCARDCONTEXT hContext);

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

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

        void SCardUnload(void);

#ifdef __cplusplus
}
#endif

#endif

Other Java examples (source code examples)

Here is a short list of links related to this Java winscard.h source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.