<!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_msg.c File Reference</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> </div> </div> <div class="contents"> <h1>winscard_msg.c File Reference</h1> <p>This is responsible for client/server communication. <a href="#_details">More...</a></p> <code>#include "config.h"</code><br/> <code>#include <fcntl.h></code><br/> <code>#include <unistd.h></code><br/> <code>#include <sys/types.h></code><br/> <code>#include <sys/stat.h></code><br/> <code>#include <sys/socket.h></code><br/> <code>#include <sys/time.h></code><br/> <code>#include <sys/un.h></code><br/> <code>#include <sys/ioctl.h></code><br/> <code>#include <errno.h></code><br/> <code>#include <stdio.h></code><br/> <code>#include <time.h></code><br/> <code>#include <string.h></code><br/> <code>#include "misc.h"</code><br/> <code>#include "<a class="el" href="pcscd_8h_source.html">pcscd.h</a>"</code><br/> <code>#include "<a class="el" href="winscard_8h_source.html">winscard.h</a>"</code><br/> <code>#include "<a class="el" href="debug_8h_source.html">debug.h</a>"</code><br/> <code>#include "<a class="el" href="winscard__msg_8h_source.html">winscard_msg.h</a>"</code><br/> <code>#include "<a class="el" href="sys__generic_8h_source.html">sys_generic.h</a>"</code><br/> <code>#include "utils.h"</code><br/> <div class="dynheader"> Include dependency graph for winscard_msg.c:</div> <div class="dynsection"> </div> <p><a href="winscard__msg_8c_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">INTERNAL int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="winscard__msg_8c.html#a5e0014bbafe9bcd7df5f44a6ebc6e2f0">SHMClientRead</a> (<a class="el" href="structrxSharedSegment.html">psharedSegmentMsg</a> msgStruct, uint32_t dwClientID, int32_t blockamount)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper for the <a class="el" href="winscard__msg_8c.html#a79ad4835c2384316592152d320eef49a" title="Called by the Client to get the reponse from the server or vice-versa.">SHMMessageReceive()</a> function. <a href="#a5e0014bbafe9bcd7df5f44a6ebc6e2f0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">INTERNAL int </td><td class="memItemRight" valign="bottom"><a class="el" href="winscard__msg_8c.html#a562fe25a1e3f02f53891cbace306bb4b">SHMClientSetupSession</a> (uint32_t *pdwClientID)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Prepares a communication channel for the client to talk to the server. <a href="#a562fe25a1e3f02f53891cbace306bb4b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">INTERNAL int </td><td class="memItemRight" valign="bottom"><a class="el" href="winscard__msg_8c.html#afa75f2e575d731004a8daa0287838af5">SHMClientCloseSession</a> (uint32_t dwClientID)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Closes the socket used by the client to communicate with the server. <a href="#afa75f2e575d731004a8daa0287838af5"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">INTERNAL int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="winscard__msg_8c.html#ac1bde0241da918d1a346c0dca681dd78">SHMMessageSend</a> (void *buffer_void, uint64_t buffer_size, int32_t filedes, int32_t blockAmount)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sends a menssage from client to server or vice-versa. <a href="#ac1bde0241da918d1a346c0dca681dd78"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">INTERNAL int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="winscard__msg_8c.html#a79ad4835c2384316592152d320eef49a">SHMMessageReceive</a> (void *buffer_void, uint64_t buffer_size, int32_t filedes, int32_t blockAmount)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Called by the Client to get the reponse from the server or vice-versa. <a href="#a79ad4835c2384316592152d320eef49a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">INTERNAL int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="winscard__msg_8c.html#a00bf262b8a867838e4a851da8123e349">WrapSHMWrite</a> (uint32_t command, uint32_t dwClientID, uint64_t size, uint32_t blockAmount, void *data_void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper for the <a class="el" href="winscard__msg_8c.html#ac1bde0241da918d1a346c0dca681dd78" title="Sends a menssage from client to server or vice-versa.">SHMMessageSend()</a> function. <a href="#a00bf262b8a867838e4a851da8123e349"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">INTERNAL void </td><td class="memItemRight" valign="bottom"><a class="el" href="winscard__msg_8c.html#a300df343a6a356eebb24216f787ad8ea">SHMCleanupSharedSegment</a> (int sockValue, const char *pcFilePath)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Closes the communications channel used by the server to talk to the clients. <a href="#a300df343a6a356eebb24216f787ad8ea"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>This is responsible for client/server communication. </p> <p>A file based socket (<code>commonSocket</code>) is used to send/receive only messages among clients and server.<br/> The messages' data are passed throw a memory mapped file: <code>sharedSegmentMsg</code>. </p> <p>Definition in file <a class="el" href="winscard__msg_8c_source.html">winscard_msg.c</a>.</p> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a300df343a6a356eebb24216f787ad8ea"></a><!-- doxytag: member="winscard_msg.c::SHMCleanupSharedSegment" ref="a300df343a6a356eebb24216f787ad8ea" args="(int sockValue, const char *pcFilePath)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">INTERNAL void SHMCleanupSharedSegment </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>sockValue</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pcFilePath</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Closes the communications channel used by the server to talk to the clients. </p> <p>The socket used is closed and the file it is bound to is removed.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>sockValue</em> </td><td>Socket to be closed. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pcFilePath</em> </td><td>File used by the socket. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="winscard__msg_8c_source.html#l00478">478</a> of file <a class="el" href="winscard__msg_8c_source.html">winscard_msg.c</a>.</p> <p>References <a class="el" href="sys__unix_8c_source.html#l00143">SYS_CloseFile()</a>, and <a class="el" href="sys__unix_8c_source.html#l00157">SYS_RemoveFile()</a>.</p> <p>Referenced by <a class="el" href="winscard__msg__srv_8c_source.html#l00133">SHMInitializeCommonSegment()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="afa75f2e575d731004a8daa0287838af5"></a><!-- doxytag: member="winscard_msg.c::SHMClientCloseSession" ref="afa75f2e575d731004a8daa0287838af5" args="(uint32_t dwClientID)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">INTERNAL int SHMClientCloseSession </td> <td>(</td> <td class="paramtype">uint32_t </td> <td class="paramname"> <em>dwClientID</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Closes the socket used by the client to communicate with the server. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dwClientID</em> </td><td>Client socket handle to be closed.</td></tr> </table> </dd> </dl> <dl><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>0</em> </td><td>Success. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="winscard__msg_8c_source.html#l00122">122</a> of file <a class="el" href="winscard__msg_8c_source.html">winscard_msg.c</a>.</p> <p>References <a class="el" href="sys__unix_8c_source.html#l00143">SYS_CloseFile()</a>.</p> <p>Referenced by <a class="el" href="winscard__svc_8c_source.html#l00126">ContextThread()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a5e0014bbafe9bcd7df5f44a6ebc6e2f0"></a><!-- doxytag: member="winscard_msg.c::SHMClientRead" ref="a5e0014bbafe9bcd7df5f44a6ebc6e2f0" args="(psharedSegmentMsg msgStruct, uint32_t dwClientID, int32_t blockamount)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">INTERNAL int32_t SHMClientRead </td> <td>(</td> <td class="paramtype"><a class="el" href="structrxSharedSegment.html">psharedSegmentMsg</a> </td> <td class="paramname"> <em>msgStruct</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint32_t </td> <td class="paramname"> <em>dwClientID</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>blockamount</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Wrapper for the <a class="el" href="winscard__msg_8c.html#a79ad4835c2384316592152d320eef49a" title="Called by the Client to get the reponse from the server or vice-versa.">SHMMessageReceive()</a> function. </p> <p>Called by clients to read the server responses.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>msgStruct</em> </td><td>Message read. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dwClientID</em> </td><td>Client socket handle. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>blockamount</em> </td><td>Timeout in milliseconds.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Same error codes as <a class="el" href="winscard__msg_8c.html#a79ad4835c2384316592152d320eef49a" title="Called by the Client to get the reponse from the server or vice-versa.">SHMMessageReceive()</a>. </dd></dl> <p>Definition at line <a class="el" href="winscard__msg_8c_source.html#l00057">57</a> of file <a class="el" href="winscard__msg_8c_source.html">winscard_msg.c</a>.</p> <p>References <a class="el" href="winscard__msg_8c_source.html#l00268">SHMMessageReceive()</a>.</p> <p>Referenced by <a class="el" href="winscard__clnt_8c_source.html#l01133">SCardBeginTransaction()</a>, <a class="el" href="winscard__clnt_8c_source.html#l01365">SCardCancelTransaction()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00734">SCardConnect()</a>, <a class="el" href="winscard__clnt_8c_source.html#l02365">SCardControl()</a>, <a class="el" href="winscard__clnt_8c_source.html#l01030">SCardDisconnect()</a>, <a class="el" href="winscard__clnt_8c_source.html#l01266">SCardEndTransaction()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00357">SCardEstablishContextTH()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00906">SCardReconnect()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00576">SCardReleaseContext()</a>, <a class="el" href="winscard__clnt_8c_source.html#l01532">SCardStatus()</a>, and <a class="el" href="winscard__clnt_8c_source.html#l02915">SCardTransmit()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a562fe25a1e3f02f53891cbace306bb4b"></a><!-- doxytag: member="winscard_msg.c::SHMClientSetupSession" ref="a562fe25a1e3f02f53891cbace306bb4b" args="(uint32_t *pdwClientID)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">INTERNAL int SHMClientSetupSession </td> <td>(</td> <td class="paramtype">uint32_t * </td> <td class="paramname"> <em>pdwClientID</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Prepares a communication channel for the client to talk to the server. </p> <p>This is called by the application to create a socket for local IPC with the server. The socket is associated to the file <code>PCSCLITE_CSOCK_NAME</code>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>pdwClientID</em> </td><td>Client Connection ID.</td></tr> </table> </dd> </dl> <dl><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>0</em> </td><td>Success. </td></tr> <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>Can not create the socket. </td></tr> <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>The socket can not open a connection. </td></tr> <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>Can not set the socket to non-blocking. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="winscard__msg_8c_source.html#l00075">75</a> of file <a class="el" href="winscard__msg_8c_source.html">winscard_msg.c</a>.</p> <p>References <a class="el" href="sys__unix_8c_source.html#l00143">SYS_CloseFile()</a>.</p> <p>Referenced by <a class="el" href="winscard__clnt_8c_source.html#l00357">SCardEstablishContextTH()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a79ad4835c2384316592152d320eef49a"></a><!-- doxytag: member="winscard_msg.c::SHMMessageReceive" ref="a79ad4835c2384316592152d320eef49a" args="(void *buffer_void, uint64_t buffer_size, int32_t filedes, int32_t blockAmount)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">INTERNAL int32_t SHMMessageReceive </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"> <em>buffer_void</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint64_t </td> <td class="paramname"> <em>buffer_size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>filedes</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>blockAmount</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Called by the Client to get the reponse from the server or vice-versa. </p> <p>Reads the message from the file <code>filedes</code>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>buffer_void</em> </td><td>Message read. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>buffer_size</em> </td><td>Size to read </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>filedes</em> </td><td>Socket handle. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>blockAmount</em> </td><td>Timeout in milliseconds.</td></tr> </table> </dd> </dl> <dl><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>0</em> </td><td>Success. </td></tr> <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>Timeout. </td></tr> <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>Socket is closed. </td></tr> <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>A signal was received. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="winscard__msg_8c_source.html#l00268">268</a> of file <a class="el" href="winscard__msg_8c_source.html">winscard_msg.c</a>.</p> <p>References <a class="el" href="pcsclite_8h_source.html#l00070">SCARD_S_SUCCESS</a>, and <a class="el" href="winscard__clnt_8c_source.html#l03790">SCardCheckDaemonAvailability()</a>.</p> <p>Referenced by <a class="el" href="winscard__svc_8c_source.html#l00256">MSGFunctionDemarshall()</a>, <a class="el" href="winscard__clnt_8c_source.html#l02365">SCardControl()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00357">SCardEstablishContextTH()</a>, <a class="el" href="winscard__clnt_8c_source.html#l02915">SCardTransmit()</a>, <a class="el" href="winscard__msg_8c_source.html#l00057">SHMClientRead()</a>, and <a class="el" href="winscard__msg__srv_8c_source.html#l00261">SHMProcessEventsContext()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ac1bde0241da918d1a346c0dca681dd78"></a><!-- doxytag: member="winscard_msg.c::SHMMessageSend" ref="ac1bde0241da918d1a346c0dca681dd78" args="(void *buffer_void, uint64_t buffer_size, int32_t filedes, int32_t blockAmount)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">INTERNAL int32_t SHMMessageSend </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"> <em>buffer_void</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint64_t </td> <td class="paramname"> <em>buffer_size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>filedes</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>blockAmount</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Sends a menssage from client to server or vice-versa. </p> <p>Writes the message in the shared file <code>filedes</code>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>buffer_void</em> </td><td>Message to be sent. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>buffer_size</em> </td><td>Size of the message to send </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>filedes</em> </td><td>Socket handle. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>blockAmount</em> </td><td>Timeout in milliseconds.</td></tr> </table> </dd> </dl> <dl><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>0</em> </td><td>Success </td></tr> <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>Timeout. </td></tr> <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>Socket is closed. </td></tr> <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>A signal was received. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="winscard__msg_8c_source.html#l00143">143</a> of file <a class="el" href="winscard__msg_8c_source.html">winscard_msg.c</a>.</p> <p>Referenced by <a class="el" href="winscard__svc_8c_source.html#l00126">ContextThread()</a>, <a class="el" href="winscard__svc_8c_source.html#l00256">MSGFunctionDemarshall()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00357">SCardEstablishContextTH()</a>, and <a class="el" href="winscard__msg_8c_source.html#l00412">WrapSHMWrite()</a>.</p> </div> </div> <a class="anchor" id="a00bf262b8a867838e4a851da8123e349"></a><!-- doxytag: member="winscard_msg.c::WrapSHMWrite" ref="a00bf262b8a867838e4a851da8123e349" args="(uint32_t command, uint32_t dwClientID, uint64_t size, uint32_t blockAmount, void *data_void)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">INTERNAL int32_t WrapSHMWrite </td> <td>(</td> <td class="paramtype">uint32_t </td> <td class="paramname"> <em>command</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint32_t </td> <td class="paramname"> <em>dwClientID</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint64_t </td> <td class="paramname"> <em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint32_t </td> <td class="paramname"> <em>blockAmount</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"> <em>data_void</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Wrapper for the <a class="el" href="winscard__msg_8c.html#ac1bde0241da918d1a346c0dca681dd78" title="Sends a menssage from client to server or vice-versa.">SHMMessageSend()</a> function. </p> <p>Called by clients to send messages to the server. The parameters <code>command</code> and <code>data</code> are set in the <code>sharedSegmentMsg</code> struct in order to be sent.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>command</em> </td><td>Command to be sent. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>dwClientID</em> </td><td>Client socket handle. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>size</em> </td><td>Size of the message (<code>data</code>). </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>blockAmount</em> </td><td>Timeout to the operation in ms. </td></tr> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>data_void</em> </td><td>Data to be sent.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Same error codes as <a class="el" href="winscard__msg_8c.html#ac1bde0241da918d1a346c0dca681dd78" title="Sends a menssage from client to server or vice-versa.">SHMMessageSend()</a>. </dd></dl> <p>Definition at line <a class="el" href="winscard__msg_8c_source.html#l00412">412</a> of file <a class="el" href="winscard__msg_8c_source.html">winscard_msg.c</a>.</p> <p>References <a class="el" href="winscard__msg_8h_source.html#l00061">rxSharedSegment::date</a>, <a class="el" href="winscard__msg_8h_source.html#l00108">SCARD_CONTROL_EXTENDED</a>, <a class="el" href="winscard__msg_8h_source.html#l00099">SCARD_TRANSMIT</a>, <a class="el" href="winscard__msg_8h_source.html#l00107">SCARD_TRANSMIT_EXTENDED</a>, <a class="el" href="winscard__msg_8c_source.html#l00143">SHMMessageSend()</a>, and <a class="el" href="winscard__msg_8h_source.html#l00058">rxSharedSegment::user_id</a>.</p> <p>Referenced by <a class="el" href="winscard__clnt_8c_source.html#l01133">SCardBeginTransaction()</a>, <a class="el" href="winscard__clnt_8c_source.html#l01365">SCardCancelTransaction()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00734">SCardConnect()</a>, <a class="el" href="winscard__clnt_8c_source.html#l02365">SCardControl()</a>, <a class="el" href="winscard__clnt_8c_source.html#l01030">SCardDisconnect()</a>, <a class="el" href="winscard__clnt_8c_source.html#l01266">SCardEndTransaction()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00357">SCardEstablishContextTH()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00906">SCardReconnect()</a>, <a class="el" href="winscard__clnt_8c_source.html#l00576">SCardReleaseContext()</a>, <a class="el" href="winscard__clnt_8c_source.html#l01532">SCardStatus()</a>, and <a class="el" href="winscard__clnt_8c_source.html#l02915">SCardTransmit()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </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>