Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

int WrapSHMWrite ( unsigned int  command,
DWORD  dwClientID,
unsigned int  size,
unsigned int  blockAmount,
void *  data 

Wrapper for the SHMMessageSend() function.

Called by clients to send messages to the server. The parameters command and data are set in the sharedSegmentMsg struct in order to be sent.

[in] command Command to be sent.
[in] dwClientID Client socket handle.
[in] size Size of the message (data).
[in] blockAmount Timeout to the operation in ms.
[in] data Data to be sent.
Same error codes as SHMMessageSend().

Definition at line 391 of file winscard_msg.c.

References rxSharedSegment::command, rxSharedSegment::data, rxSharedSegment::date, rxSharedSegment::group_id, rxSharedSegment::mtype, SHMMessageSend(), and rxSharedSegment::user_id.

Referenced by SCardBeginTransaction(), SCardCancelTransaction(), SCardConnect(), SCardControl(), SCardDisconnect(), SCardEndTransaction(), SCardEstablishContextTH(), SCardReconnect(), SCardReleaseContext(), SCardStatus(), and SCardTransmit().

      sharedSegmentMsg msgStruct;

       * Set the appropriate packet parameters 

      memset(&msgStruct, 0, sizeof(msgStruct));
      msgStruct.mtype = CMD_FUNCTION;
      msgStruct.user_id = SYS_GetUID();
      msgStruct.group_id = SYS_GetGID();
      msgStruct.command = command;
      msgStruct.date = time(NULL);
      memcpy(msgStruct.data, data, size);

      return SHMMessageSend(&msgStruct, dwClientID, blockAmount);

Generated by  Doxygen 1.6.0   Back to index