int stdcall YW_Felica_Polling
(
int ReaderID,
unsigned short SystemCode,
unsigned char RequestCode,
unsigned char Slot,
unsigned char *IDM,
unsigned char *PMm,
unsigned char *RequestData
)
参数 |
类型 |
方向 |
含义 |
ReaderID |
int |
IN |
所要获取的设备标示ID,范围0x0000-0xFFFF,如果未知,则ReaderID=0 |
SystemCode |
unsigned
short |
IN |
Felica参数,System Code |
RequestCode |
unsigned char |
IN |
Felica参数,Request Code 0x00: No
Request 0x01: System
Code Request 0x02:
Communication Performance Request 其他:RFU |
Slot |
unsigned char |
IN |
最大响应时间,可以设置的值:0x00,0x01,0x03,0x07,0x0F |
IDM |
unsigned char* |
OUT |
卡号,8字节 |
PMm |
unsigned char* |
OUT |
PMm,8字节 |
RequestData |
unsigned char* |
OUT |
只有当RequestCode=0x01和0x02时,才会返回Request data,2字节 |
返 回 值:大于0为命令发送成功,<=0为命令发送失败
int stdcall YW_Felica_Polling(int ReaderID, unsigned short SystemCode, unsigned char RequestCode, unsigned char Slot, unsigned char *IDM, unsigned char *PMm, unsigned char *RequestData)
function YW_Felica_Polling(ReaderID: Integer; SystemCode: Word;RequestCode: Byte; Slot: Byte;
Public Declare Function YW_Felica_Polling Lib "YW60x.dll" (ByVal ReaderID As Long, ByVal SystemCode As Integer, ByVal RequestCode As Byte, ByVal Slot As Byte, _
public int YW_Felica_Polling(int ReaderID, short SystemCode, byte RequestCode, byte Slot,
Pointer IDM, Pointer PMm, Pointer RequestData)
{
int ret;
try
{
JNative fuc = new JNative("YW60x.dll", "YW_Felica_Polling");
fuc.setRetVal(Type.INT);
fuc.setParameter(0, ReaderID);
fuc.setParameter(1, SystemCode);
fuc.setParameter(2, RequestCode);
fuc.setParameter(3, Slot);
fuc.setParameter(4, IDM);
fuc.setParameter(5, PMm);
fuc.setParameter(6, RequestData);
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_Felica_Polling(int ReaderID, ushort SystemCode, byte RequestCode, byte Slot,byte[] IDM, byte[] PMm, byte[] RequestData);
public FUNCTION long YW_Felica_Polling (long lReaderID , Integer SystemCode , char RequestCode, char Slot, ref char IDM[], ref char PMm[], ref char RequestData[])