<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>pcsc-lite: winscard.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.2-20100208 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_c68a5dfdca54003c765e303a18006edb.html">src</a> » <a class="el" href="dir_f67468d866d6eb9fc9120b0a9ddded4e.html">PCSC</a> </div> </div> <div class="contents"> <h1>winscard.h</h1><a href="winscard_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * MUSCLE SmartCard Development ( http://www.linuxnet.com )</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 1999-2003</span> <a name="l00005"></a>00005 <span class="comment"> * David Corcoran <corcoran@linuxnet.com></span> <a name="l00006"></a>00006 <span class="comment"> * Ludovic Rousseau <ludovic.rousseau@free.fr></span> <a name="l00007"></a>00007 <span class="comment"> *</span> <a name="l00008"></a>00008 <span class="comment"> * $Id: winscard.h 3260 2009-01-02 15:19:59Z rousseau $</span> <a name="l00009"></a>00009 <span class="comment"> */</span> <a name="l00010"></a>00010 <a name="l00016"></a>00016 <span class="preprocessor">#ifndef __winscard_h__</span> <a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define __winscard_h__</span> <a name="l00018"></a>00018 <span class="preprocessor"></span> <a name="l00019"></a>00019 <span class="preprocessor">#include <<a class="code" href="pcsclite_8h.html" title="This keeps a list of defines for pcsc-lite.">pcsclite.h</a>></span> <a name="l00020"></a>00020 <a name="l00021"></a>00021 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00022"></a>00022 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> <a name="l00023"></a>00023 { <a name="l00024"></a>00024 <span class="preprocessor">#endif</span> <a name="l00025"></a>00025 <span class="preprocessor"></span> <a name="l00026"></a>00026 <span class="preprocessor">#ifndef PCSC_API</span> <a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define PCSC_API</span> <a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00029"></a>00029 <span class="preprocessor"></span> <a name="l00030"></a>00030 PCSC_API LONG <a class="code" href="group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67" title="Creates an Application Context for a client.">SCardEstablishContext</a>(DWORD dwScope, <a name="l00031"></a>00031 <span class="comment">/*@null@*/</span> LPCVOID pvReserved1, <span class="comment">/*@null@*/</span> LPCVOID pvReserved2, <a name="l00032"></a>00032 <span class="comment">/*@out@*/</span> LPSCARDCONTEXT phContext); <a name="l00033"></a>00033 <a name="l00034"></a>00034 PCSC_API LONG <a class="code" href="group__API.html#ga6aabcba7744c5c9419fdd6404f73a934" title="This function destroys a communication context to the PC/SC Resource Manager.">SCardReleaseContext</a>(<a class="code" href="pcsclite_8h.html#a3524142a16d7185916422baf6bb7883f" title="hContext returned by SCardEstablishContext()">SCARDCONTEXT</a> hContext); <a name="l00035"></a>00035 <a name="l00036"></a>00036 PCSC_API LONG <a class="code" href="group__API.html#ga722eb66bcc44d391f700ff9065cc080b" title="Check if a SCARDCONTEXT is valid.">SCardIsValidContext</a>(<a class="code" href="pcsclite_8h.html#a3524142a16d7185916422baf6bb7883f" title="hContext returned by SCardEstablishContext()">SCARDCONTEXT</a> hContext); <a name="l00037"></a>00037 <a name="l00038"></a>00038 PCSC_API LONG <a class="code" href="group__API.html#ga812e35ead06d4690fa96aecf371c6255" title="The function does not do anything except returning SCARD_S_SUCCESS.">SCardSetTimeout</a>(<a class="code" href="pcsclite_8h.html#a3524142a16d7185916422baf6bb7883f" title="hContext returned by SCardEstablishContext()">SCARDCONTEXT</a> hContext, DWORD dwTimeout); <a name="l00039"></a>00039 <a name="l00040"></a>00040 PCSC_API LONG <a class="code" href="group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5" title="This function establishes a connection to the reader specified in szReader.">SCardConnect</a>(<a class="code" href="pcsclite_8h.html#a3524142a16d7185916422baf6bb7883f" title="hContext returned by SCardEstablishContext()">SCARDCONTEXT</a> hContext, <a name="l00041"></a>00041 LPCSTR szReader, <a name="l00042"></a>00042 DWORD dwShareMode, <a name="l00043"></a>00043 DWORD dwPreferredProtocols, <a name="l00044"></a>00044 <span class="comment">/*@out@*/</span> LPSCARDHANDLE phCard, <span class="comment">/*@out@*/</span> LPDWORD pdwActiveProtocol); <a name="l00045"></a>00045 <a name="l00046"></a>00046 PCSC_API LONG <a class="code" href="group__API.html#gad5d4393ca8c470112ad9468c44ed8940" title="This function reestablishes a connection to a reader that was previously connected...">SCardReconnect</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard, <a name="l00047"></a>00047 DWORD dwShareMode, <a name="l00048"></a>00048 DWORD dwPreferredProtocols, <a name="l00049"></a>00049 DWORD dwInitialization, <span class="comment">/*@out@*/</span> LPDWORD pdwActiveProtocol); <a name="l00050"></a>00050 <a name="l00051"></a>00051 PCSC_API LONG <a class="code" href="group__API.html#ga4be198045c73ec0deb79e66c0ca1738a" title="This function terminates a connection made through SCardConnect().">SCardDisconnect</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard, DWORD dwDisposition); <a name="l00052"></a>00052 <a name="l00053"></a>00053 PCSC_API LONG <a class="code" href="group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861" title="This function establishes a temporary exclusive access mode for doing a serie of...">SCardBeginTransaction</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard); <a name="l00054"></a>00054 <a name="l00055"></a>00055 PCSC_API LONG <a class="code" href="group__API.html#gae8742473b404363e5c587f570d7e2f3b" title="This function ends a previously begun transaction.">SCardEndTransaction</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard, DWORD dwDisposition); <a name="l00056"></a>00056 <a name="l00057"></a>00057 PCSC_API LONG <a class="code" href="group__API.html#ga294d4c60b3631b9584a8c854ee8c3b1b">SCardCancelTransaction</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard); <a name="l00058"></a>00058 <a name="l00059"></a>00059 PCSC_API LONG <a class="code" href="group__API.html#ga18f33eebb45d9e0d2a091ca7a0511d26" title="This function returns the current status of the reader connected to by hCard.">SCardStatus</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard, <a name="l00060"></a>00060 <span class="comment">/*@null@*/</span> <span class="comment">/*@out@*/</span> LPSTR mszReaderName, <a name="l00061"></a>00061 <span class="comment">/*@null@*/</span> <span class="comment">/*@out@*/</span> LPDWORD pcchReaderLen, <a name="l00062"></a>00062 <span class="comment">/*@null@*/</span> <span class="comment">/*@out@*/</span> LPDWORD pdwState, <a name="l00063"></a>00063 <span class="comment">/*@null@*/</span> <span class="comment">/*@out@*/</span> LPDWORD pdwProtocol, <a name="l00064"></a>00064 <span class="comment">/*@null@*/</span> <span class="comment">/*@out@*/</span> LPBYTE pbAtr, <a name="l00065"></a>00065 <span class="comment">/*@null@*/</span> <span class="comment">/*@out@*/</span> LPDWORD pcbAtrLen); <a name="l00066"></a>00066 <a name="l00067"></a>00067 PCSC_API LONG <a class="code" href="group__API.html#gad1db67ba2b7d143498257294b873c049" title="This function receives a structure or list of structures containing reader names...">SCardGetStatusChange</a>(<a class="code" href="pcsclite_8h.html#a3524142a16d7185916422baf6bb7883f" title="hContext returned by SCardEstablishContext()">SCARDCONTEXT</a> hContext, <a name="l00068"></a>00068 DWORD dwTimeout, <a name="l00069"></a>00069 <a class="code" href="structSCARD__READERSTATE__A.html">LPSCARD_READERSTATE_A</a> rgReaderStates, DWORD cReaders); <a name="l00070"></a>00070 <a name="l00071"></a>00071 PCSC_API LONG <a class="code" href="group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f" title="This function sends a command directly to the IFD Handler (reader driver) to be processed...">SCardControl</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard, DWORD dwControlCode, <a name="l00072"></a>00072 LPCVOID pbSendBuffer, DWORD cbSendLength, <a name="l00073"></a>00073 <span class="comment">/*@out@*/</span> LPVOID pbRecvBuffer, DWORD cbRecvLength, <a name="l00074"></a>00074 LPDWORD lpBytesReturned); <a name="l00075"></a>00075 <a name="l00076"></a>00076 PCSC_API LONG <a class="code" href="group__API.html#gac60e9e6c93b04e61594a3a8f69ee1898" title="This function sends an APDU to the smart card contained in the reader connected to...">SCardTransmit</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard, <a name="l00077"></a>00077 <a class="code" href="structSCARD__IO__REQUEST.html" title="Protocol Control Information (PCI).">LPCSCARD_IO_REQUEST</a> pioSendPci, <a name="l00078"></a>00078 LPCBYTE pbSendBuffer, DWORD cbSendLength, <a name="l00079"></a>00079 <span class="comment">/*@out@*/</span> <a class="code" href="structSCARD__IO__REQUEST.html" title="Protocol Control Information (PCI).">LPSCARD_IO_REQUEST</a> pioRecvPci, <a name="l00080"></a>00080 <span class="comment">/*@out@*/</span> LPBYTE pbRecvBuffer, LPDWORD pcbRecvLength); <a name="l00081"></a>00081 <a name="l00082"></a>00082 PCSC_API LONG <a class="code" href="group__API.html#ga9d970d086d5218e080d0079d63f9d496" title="This function returns a list of currently available reader groups on the system.">SCardListReaderGroups</a>(<a class="code" href="pcsclite_8h.html#a3524142a16d7185916422baf6bb7883f" title="hContext returned by SCardEstablishContext()">SCARDCONTEXT</a> hContext, <a name="l00083"></a>00083 <span class="comment">/*@out@*/</span> LPSTR mszGroups, LPDWORD pcchGroups); <a name="l00084"></a>00084 <a name="l00085"></a>00085 PCSC_API LONG <a class="code" href="group__API.html#ga93b07815789b3cf2629d439ecf20f0d9" title="This function returns a list of currently available readers on the system.">SCardListReaders</a>(<a class="code" href="pcsclite_8h.html#a3524142a16d7185916422baf6bb7883f" title="hContext returned by SCardEstablishContext()">SCARDCONTEXT</a> hContext, <a name="l00086"></a>00086 <span class="comment">/*@null@*/</span> <span class="comment">/*@out@*/</span> LPCSTR mszGroups, <a name="l00087"></a>00087 <span class="comment">/*@null@*/</span> <span class="comment">/*@out@*/</span> LPSTR mszReaders, <a name="l00088"></a>00088 <span class="comment">/*@out@*/</span> LPDWORD pcchReaders); <a name="l00089"></a>00089 <a name="l00090"></a>00090 PCSC_API LONG <a class="code" href="group__API.html#ga0522241e3180cb05dfd166e28930e961" title="Releases memory that has been returned from the resource manager using the SCARD_AUTOALLOCATE...">SCardFreeMemory</a>(<a class="code" href="pcsclite_8h.html#a3524142a16d7185916422baf6bb7883f" title="hContext returned by SCardEstablishContext()">SCARDCONTEXT</a> hContext, LPCVOID pvMem); <a name="l00091"></a>00091 <a name="l00092"></a>00092 PCSC_API LONG <a class="code" href="group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6" title="This function cancels all pending blocking requests on the SCardGetStatusChange()...">SCardCancel</a>(<a class="code" href="pcsclite_8h.html#a3524142a16d7185916422baf6bb7883f" title="hContext returned by SCardEstablishContext()">SCARDCONTEXT</a> hContext); <a name="l00093"></a>00093 <a name="l00094"></a>00094 PCSC_API LONG <a class="code" href="group__API.html#gaacfec51917255b7a25b94c5104961602" title="This function get an attribute from the IFD Handler (reader driver).">SCardGetAttrib</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard, DWORD dwAttrId, <a name="l00095"></a>00095 <span class="comment">/*@out@*/</span> LPBYTE pbAttr, LPDWORD pcbAttrLen); <a name="l00096"></a>00096 <a name="l00097"></a>00097 PCSC_API LONG <a class="code" href="group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f" title="This function set an attribute of the IFD Handler.">SCardSetAttrib</a>(<a class="code" href="pcsclite_8h.html#a0ef8f5baf9ee6c07dbdc7644c641d0a9" title="hCard returned by SCardConnect()">SCARDHANDLE</a> hCard, DWORD dwAttrId, <a name="l00098"></a>00098 LPCBYTE pbAttr, DWORD cbAttrLen); <a name="l00099"></a>00099 <a name="l00100"></a>00100 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00101"></a>00101 <span class="preprocessor"></span>} <a name="l00102"></a>00102 <span class="preprocessor">#endif</span> <a name="l00103"></a>00103 <span class="preprocessor"></span> <a name="l00104"></a>00104 <span class="preprocessor">#endif</span> <a name="l00105"></a>00105 <span class="preprocessor"></span> </pre></div></div> <hr class="footer"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address> </body> </html>