int stdcall YW_EY5K_SamReset(int
ReaderID,unsigned char SamIndex, unsigned char *DataLen,unsigned char *Data);
参数列表:
参数 |
类型 |
方向 |
含义 |
ReaderID |
int |
IN |
所要获取的设备标示ID,范围0x0000-0xFFFF,如果未知,则ReaderID=0 |
SamIndex |
unsigned char |
IN |
SAM卡序号 0: 读卡器模拟SAM卡 1: SAM卡槽卡一 2: SAM卡槽卡二 |
DataLen |
unsigned char |
OUT |
复位返回的数据字节数 |
Data |
unsigned char* |
OUT |
复位返回的复位信息 |
返 回 值:大于0为命令发送成功,<=0为命令发送失败
RFIDFUNCTION YW_EY5K_SamReset(int ReaderID,unsigned char SamIndex, unsigned char *DataLen,unsigned char *Data);
function YW_EY5K_SamReset(ReaderID: Integer; SamIndex: Byte; var DataLen: Byte; Data: PByte): Integer;stdcall;external YOWOREADERDLL;
Public Declare Function YW_EY5K_SamReset Lib "YW60x.dll" (ByVal ReaderID As Long, ByVal SamIndex As Byte, Datalen As Byte, data As Byte) As Long
public int YW_EY5K_SamReset(int ReaderID,byte SamIndex,Pointer DataLen,Pointer Data)
{
int ret;
try
{
JNative fuc = new JNative("YW60x.dll", "YW_EY5K_SamReset");
fuc.setRetVal(Type.INT);
fuc.setParameter(0, ReaderID);
fuc.setParameter(1, SamIndex);
fuc.setParameter(2, DataLen);
fuc.setParameter(3, Data);
fuc.invoke();
ret = fuc.getRetValAsInt();
}
catch(NativeException e)
{
ret = -1;
}
catch(IllegalAccessException e)
{
ret = -2;
}
return ret;
}
[DllImport("YW60x.dll")]
public static extern int YW_EY5K_SamReset(int ReaderID,byte SamIndex,ref byte DataLen,byte[] Data);