EasyManua.ls Logo

Identiv uTrust 4711F - Page 87

Identiv uTrust 4711F
92 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Document Version 1.2
Last revised on
2017-09-26
Page 87 of 92
Reference Manual for uTrust 4701F and uTrust 4711F Readers
#ifdef __cplusplus
}
#endif
#endif
File Name: uTrust 47xx F Escape.c
#include <windows.h>
#include <winbase.h>
#include <stdio.h>
#include <conio.h>
#include "winscard.h"
#include "winerror.h"
#include "uTrust 47xxF Escape.h"
VOID main(VOID)
{
SCARDCONTEXT ContextHandle;
SCARDHANDLE CardHandle;
ReaderInfoExtended strReaderInfo;
BYTE InByte, i;
DWORD BytesRead, ActiveProtocol;
ULONG ret;
char *s;
char *ReaderName[] = {"Identiv uTrust 4701 F Contact Reader 0",
"Identiv uTrust 4701 F Contactless Reader 0",
NULL};
/*********************************************************************************************
***********/
ContextHandle = -1;
ret = SCardEstablishContext(SCARD_SCOPE_USER, NULL, NULL, &ContextHandle);
if (ret == SCARD_S_SUCCESS)
{
s = ReaderName[0];
printf("Connecting to reader %s\n", s);
ret = SCardConnect( ContextHandle,
s,
SCARD_SHARE_DIRECT,
SCARD_PROTOCOL_UNDEFINED,
&CardHandle,
&ActiveProtocol);
if (ret == SCARD_S_SUCCESS)
{
InByte = 0x1E;
ret = SCardControl( CardHandle,
IOCTL_CCID_ESCAPE,
&InByte,
1,
&strReaderInfo,
sizeof(strReaderInfo),
&BytesRead);
if (SCARD_S_SUCCESS == ret) {
printf("major version:\t\t%d%d\n", (strReaderInfo.byMajorVersion& 0xF0)>> 4,
(strReaderInfo.byMajorVersion& 0x0F));
printf("minor version:\t\t%d%d\n", (strReaderInfo.byMinorVersion& 0xF0)>> 4,
(strReaderInfo.byMinorVersion& 0x0F));
printf("modes:\t\t\t%d\n", strReaderInfo.bySupportedModes);
printf("protocols:\t\t%04x\n", strReaderInfo.wSupportedProtocols);
printf("input device:\t\t%04x\n", strReaderInfo.winputDevice);
printf("personality:\t\t%d\n", strReaderInfo.byPersonality);
printf("maxslots:\t\t%d\n", strReaderInfo.byMaxSlots);
printf("serial no length:\t%d\n", strReaderInfo.bySerialNoLength);
printf("serial no:\t\t");

Table of Contents

Related product manuals