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

📄 sendcmd.h

📁 智能卡密钥加密
💻 H
字号:

// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the SENDCMD_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// SENDCMD_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef SENDCMD_EXPORTS
#define SENDCMD_API __declspec(dllexport)
#else
#define SENDCMD_API __declspec(dllimport)
#endif

#define CardSet_User 12			//用户卡卡座号(德卡)
#define CardSet_PSAM 14			//PSAM卡卡座号
#define cardset_user 0x00       //用户卡卡座号(明华)
#define cardset_psam 0x11       //PSAM卡卡座号
#define cardset_User 0x01       //用户卡卡座号(华大)
#define cardset_Psam 0x11       //PSAM卡卡座号

/*
// This class is exported from the SendCmd.dll
class SENDCMD_API CSendCmd {
public:
	CSendCmd(void);
	// TODO: add your methods here.
};

extern SENDCMD_API int nSendCmd;

SENDCMD_API int fnSendCmd(void);
*/

#ifdef __cplusplus
extern "C"
{
#endif


//无符号长整型转换为字节数组(按小尾模式表示)
//ch:是转换后的字节数组
//LG:是转换前的长整型
void LONGTOBYTE(unsigned long LG,unsigned char * ch);

//字节数组(按小尾模式表示)转换为无符号长整型//
//ch:是转换前的字节数组
//LG:是转换后的长整型(返回值)
int BYTETOLONG(unsigned char *ch);

/************************************************************
*功能:发送指令	用于德卡读卡器							    *
*输入:	h 读卡器句柄	                                    *
*cardset卡片类型					                        *
*		cmd:发往cpu卡的指令指令								*
*输出:	resp:响应数据										*
*		resplen:响应数据长度								*
*返回:指令响应状态码										*
*															*
*************************************************************/
WORD __stdcall SendCmd(HANDLE h
					   , __int16 CardSet
					   , unsigned char *cmd
					   , unsigned int cmdlen
					   , unsigned char *resp
					   , unsigned char *resplen);

/************************************************************
*功能:发送指令	用于明华读卡器							    *
*输入:	h 读卡器句柄	                                    *
*cardset卡片类型					                        *
*		cmd:发往cpu卡的指令指令								*
*输出:	resp:响应数据										*
*		resplen:响应数据长度								*
*返回:指令响应状态码										*
*															*
*************************************************************/
WORD _stdcall SENDCMD1(long h, unsigned char cardset,unsigned char *cmd, long cmdlen, unsigned char *resp, long * resplen);

/************************************************************
*功能:发送指令	用于华大读卡器							    *
*输入:	h 读卡器句柄	                                    *
*cardset卡片类型					                        *
*		cmd:发往cpu卡的指令指令								*
*输出:	resp:响应数据										*
*		resplen:响应数据长度								*
*返回:指令响应状态码										*
*															*
*************************************************************/
WORD _stdcall SENDCMD2(long h, unsigned char cardset,unsigned char *cmd, long cmdlen, unsigned char *resp, long * resplen);

#ifdef __cplusplus
}
#endif

⌨️ 快捷键说明

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