CLOUD
47
X
0
F
R
EFERENCE
M
ANUAL
93
File Name: CLOUD 47x0 F Escape.c
#include <windows.h>
#include <winbase.h>
#include <stdio.h>
#include <conio.h>
#include "winscard.h"
#include "winerror.h"
#include "CLOUD 47x0F Escape.h"
VOID main(VOID)
{
SCARDCONTEXT
ContextHandle;
SCARDHANDLE
CardHandle;
ReaderInfoExtended strReaderInfo;
BYTE
InByte, i;
DWORD
BytesRead, ActiveProtocol;
ULONG
ret;
char
*s;
char
*ReaderName[] = {"Identive CLOUD 4700 F Contact Reader 0",
"Identive CLOUD 4700 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");
for (i = 0; i <strReaderInfo.bySerialNoLength; i++)
if (strReaderInfo.abySerialNumber[i] != 0) printf("%c",
strReaderInfo.abySerialNumber[i]);
} else {
printf("SCardControl failed: %08X\n", ret);
}
}
else {
printf("SCardConnect failed: %08X\n", ret);
}
Содержание CLOUD 47x0 F
Страница 1: ...Identive Infrastructure Reference Manual version 1 0 CLOUD 47x0 F Dual Interface Smartcard Readers ...
Страница 8: ......
Страница 95: ...CLOUD 47X0 F REFERENCE MANUAL 95 7 3 Annex C Mechanical drawings 7 3 1 Outline and cable positions ...
Страница 96: ...CLOUD 47X0 F REFERENCE MANUAL 96 7 3 2 Stand ...
Страница 97: ...CLOUD 47X0 F REFERENCE MANUAL 97 7 3 3 Reader mounted to Stand ...
Страница 98: ...CLOUD 47X0 F REFERENCE MANUAL 98 7 3 4 CLOUD 4710 F SAM slot ...