User's Manual

Table Of Contents
SDI011 REFERENCE MANUAL 62
7.2. Annex B Sample code using escape commands
through Escape IOCTL
File Name : T_hbr.H
#ifdef __cplusplus
extern "C" {
#endif
#define IOCTL_CCID_ESCAPE SCARD_CTL_CODE (0xDAC)
#define CCID_GET_848KBPS_STATUS 0xFF9D
#define CCID_SET_848KBPS_ON 0x019D
#define CCID_SET_848KBPS_OFF 0x009D
#define MINTIMEOUT 300
#ifdef __cplusplus
}
#endif
File Name : T_hbr.CPP
#include <windows.h>
#include <winbase.h>
#include <stdio.h>
#include <conio.h>
#include "winscard.h"
#include "winerror.h"
#include "T_hbr.H"
VOID main(VOID)
{
SCARDCONTEXT ContextHandle;
SCARDHANDLE CardHandle;
BYTE OutByte;
WORD InWord,i;
DWORD ActiveProtocol; /* ICC protocol */
ULONG InBufLen,ResLen;
ULONG ret;