⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pcscwrap.h

📁 A staff Module ListA staff Module ListA staff Module ListA staff Module ListA staff Module ListA sta
💻 H
字号:
/* ************************************************************************

   Smart Card Digging Utilities
   PC/SC Wrappers

   Written by Ilya O. Levin, http://www.literatecode.com    

   This source code released for free "as is" under the whatever ABC 
   license without warranty or liability of any kind. Use it at your 
   own risk any way you like for legitimate purposes only. 

   ************************************************************************
*/
#pragma once
#pragma comment( lib, "winscard" )
#pragma warning (disable: 4514)     // "unref inline fn has been removed"
#pragma warning (push, 1)
#define WINDOWS_MEAN_AND_LEAN
#include <windows.h>
#include <winscard.h>
#pragma warning (pop)

#define SC_OK		SCARD_S_SUCCESS
#define SC_BAD		0xBEDA

#ifdef __cplusplus
extern "C" { 
#endif

typedef struct
{
  SCARDCONTEXT hCtx;    
  SCARDHANDLE  hCard;
  LPCSCARD_IO_REQUEST proto;
  BYTE sw[256];              // output of the last operation
  DWORD  rdrsz;              // length of reader's name
  LPBYTE rdr;                // name of the connected reader
  BYTE CLA;                  // CLA byte
  BYTE lCLA;                 // last operation's class (CLA byte) 
  unsigned short rw;         // status word of last operation
} sc_context;

char *sc_listreaders (void);
LONG sc_init (sc_context *, char *);
LONG sc_init_u (sc_context *, char *);
LONG sc_done (sc_context *, DWORD);
#define sc_finish(x) sc_done(x, SCARD_LEAVE_CARD)
LONG sc_selectfile (sc_context *, DWORD);
LONG sc_getresponse (sc_context *);
LONG sc_readdata (sc_context *, BYTE, DWORD);
LONG sc_updatedata (sc_context *, BYTE *, BYTE, DWORD);
LONG sc_rawsend (sc_context *, void *, BYTE);
char *rc_symb (LONG); 

#ifdef __cplusplus
} 
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -