int stdcall YW_RequestCard
(
int ReaderID,
char RequestMode ,
unsigned short *CardType
);
参数 |
类型 |
方向 |
含义 |
ReaderID |
int |
IN |
所要获取的设备标示ID,范围0x0000-0xFFFF,如果未知,则ReaderID=0 |
RequestMode |
char |
IN |
寻卡的模式: 0x52->所有卡 0x26->未休眠卡 |
CardType |
unsigned short
* |
OUT |
返回卡的类型:ATQA(2字节) 0x4400-> Ultralight/UltraLight
C /MifarePlus(7Byte UID) 0x0400-> Mifare Mini/Mifare
1K (S50) /MifarePlus(4Byte UID) 0x0200-> Mifare_4K(S70)/
MifarePlus(4Byte UID) 0x0800-> Mifare_Pro 0x0403-> Mifare_ProX 0x4403->Mifare_DESFire 0x4200-> MifarePlus(7Byte
UID) |
返 回 值:大于0为命令发送成功,<=0为命令发送失败
int stdcall YW_RequestCard(int ReaderID,char RequestMode , unsigned short *CardType);
function YW_RequestCard(ReaderID: Integer;RequestMode: Byte;var CardType: Word): Integer;stdcall;external YOWOREADERDLL;
Public Declare Function YW_RequestCard Lib "YW60x.dll" (ByVal ReaderID As Long, ByVal RequestMode As Byte, ByRef CardType As Integer) As Long
public int YW_RequestCard(int ReaderID,int RequestMode , Pointer CardType)
{
int ret;
try
{
JNative fuc = new JNative("YW60x.dll", "YW_RequestCard");
fuc.setRetVal(Type.INT);
fuc.setParameter(0, ReaderID);
fuc.setParameter(1,RequestMode);
fuc.setParameter(2,CardType);
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_RequestCard(int ReaderID,byte RequestMode, ref ushort CardType);
public FUNCTION long YW_RequestCard (long lReaderID , char RequestMode, ref integer CardType ) library "YW60x.dll"