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

RESPONSECODE IFDHCreateChannel ( DWORD  Lun,
DWORD  Channel 
)

This function is required to open a communications channel to the port listed by Channel. For example, the first serial reader on COM1 would link to /dev/pcsc/1 which would be a symbolic link to /dev/ttyS0 on some machines This is used to help with inter-machine independence.

On machines with no /dev directory the driver writer may choose to map their Channel to whatever they feel is appropriate.

Once the channel is opened the reader must be in a state in which it is possible to query IFDHICCPresence() for card status.

USB readers can ignore the Channel parameter and query the USB bus for the particular reader by manufacturer and product id.

Parameters:
[in]LunLogical Unit Number
Use this for multiple card slots or multiple readers. 0xXXXXYYYY - XXXX multiple readers, YYYY multiple slots. The resource manager will set these automatically. By default the resource manager loads a new instance of the driver so if your reader does not have more than one smart card slot then ignore the Lun in all the functions.

PC/SC supports the loading of multiple readers through one instance of the driver in which XXXX is important. XXXX identifies the unique reader in which the driver communicates to. The driver should set up an array of structures that associate this XXXX with the underlying details of the particular reader.
[in]ChannelChannel ID This is denoted by the following:

  • 0x000001 /dev/pcsc/1
  • 0x000002 /dev/pcsc/2
  • 0x000003 /dev/pcsc/3
  • 0x000004 /dev/pcsc/4
Returns:
Error codes
Return values:
IFD_SUCCESSSuccessful (IFD_SUCCESS)
IFD_COMMUNICATION_ERRORError has occurred (IFD_COMMUNICATION_ERROR)
IFD_NO_SUCH_DEVICEThe reader is no more present (IFD_NO_SUCH_DEVICE)

Referenced by IFDOpenIFD().

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index