YW_Felica_ReadWithoutEncryption
Felica卡片不加密读操作

参数列表:

int stdcall YW_Felica_ReadWithoutEncryption

(

int ReaderID, 

unsigned char *IDM,

unsigned char NumberofService, 

unsigned char *ServiceCodeList, 

unsigned char NumberofBlock, 

unsigned char LengthofBlockList, 

unsigned char *BlockList, 

unsigned char *Status1, 

unsigned char *Status2, 

unsigned char *pBlockData

)


参数含义:

参数

类型

方向

含义

ReaderID

int

IN

所要获取的设备标示ID,范围0x0000-0xFFFF,如果未知,则ReaderID=0

IDM

unsigned char*

IN

Felica卡卡号,8字节

NumberofService

unsigned char

IN

Service数量

ServiceCodeList

unsigned char*

IN

Service内容,字节数为2* NumberofService

NumberofBlock

unsigned char

IN

Block块的数量

LengthofBlockList

unsigned char

IN

Block列表的字节长度

BlockList

unsigned char*

IN

Block列表的内容

Status1

unsigned char*

OUT

读取后的状态字节Status11字节

Status2

unsigned char*

OUT

读取后的状态字节Status21字节

pBlockData

unsigned char*

OUT

读到的块数据,只有当函数返回>0时,此处才有返回,字节数为NumberofBlock*16,如果失败,请查看状态Status1Status2

返 回 值:大于0为命令发送成功,<=0为命令发送失败


C++声明(VC++和C++ Builder):

int stdcall YW_Felica_ReadWithoutEncryption(int ReaderID, unsigned char *IDM,unsigned char NumberofService, unsigned char *ServiceCodeList, unsigned char NumberofBlock, unsigned char LengthofBlockList, unsigned char *BlockList, unsigned char *Status1, unsigned char *Status2, unsigned char *pBlockData)


Delphi声明:

function YW_Felica_ReadWithoutEncryption(ReaderID: Integer; IDM: PChar;


VB声明:

Public Declare Function YW_Felica_ReadWithoutEncryption Lib "YW60x.dll" (ByVal ReaderID As Long, ByRef IDM As Byte, _


JAVA声明:

public int YW_Felica_ReadWithoutEncryption(int ReaderID, Pointer IDM,

byte NumberofService, Pointer ServiceCodeList,

byte NumberofBlock, byte LengthofBlockList, Pointer BlockList,

Pointer Status1, Pointer Status2, Pointer pBlockData)

{

int ret;

try

{

JNative fuc = new JNative("YW60x.dll", "YW_Felica_ReadWithoutEncryption");

fuc.setRetVal(Type.INT);

fuc.setParameter(0, ReaderID);

fuc.setParameter(1, IDM);

fuc.setParameter(2, NumberofService);

fuc.setParameter(3, ServiceCodeList);

fuc.setParameter(4, NumberofBlock);

fuc.setParameter(5, LengthofBlockList);

fuc.setParameter(6, BlockList);

fuc.setParameter(7, Status1);

fuc.setParameter(8, Status2);

fuc.setParameter(9, pBlockData);

fuc.invoke();

ret = fuc.getRetValAsInt();

}

catch(NativeException e)

{

ret = -1;

}

catch(IllegalAccessException e)

{

ret = -2;

}

return ret;

}


C#声明:

[DllImport("YW60x.dll")]

public static extern int YW_Felica_ReadWithoutEncryption(int ReaderID, byte[] IDM,byte NumberofService, byte[] ServiceCodeList,byte NumberofBlock, byte


Power Builder 9 声明:

public FUNCTION long YW_Felica_ReadWithoutEncryption (long lReaderID , ref char IDM[],char NumberofService , ref char ServiceCodeList[],char NumberofBlock , char


支持的RFID读写器:
YW-607