int stdcall YW_SAM_PPSBaudEx
(
int ReaderID,
int SAMIndex,
int BaudIndex,
int Protocol
);
参数 |
类型 |
方向 |
含义 |
ReaderID |
int |
IN |
所要获取的设备标示ID,范围0x0000-0xFFFF,如果未知,则ReaderID=0 |
SAMIndex |
int |
IN |
ISO7816 卡序号 0x00-> SAM1 0x01-> SAM2 0x02> IC卡插槽 |
BaudIndex |
int |
IN |
ISO7816 卡速率: 0x00->9600、0x01->19200、0x02->38400、 0x03->55800、0x04->57600、0x05->115200、 0x06->223200、0x07->230400、0x08->446400、 0x09->460800 |
Protocol |
int |
IN |
重新定义协议类型:(必须卡片支持此协议) 0x00->T0 0x01->T1 其它->保持原有协议不变 |
返 回 值:大于0为成功,<=0为失败
int stdcall YW_SAM_PPSBaudEx(int ReaderID,int SAMIndex, int BaudIndex,int Protocol);
function YW_SAM_PPSBaudEx(ReaderID: Integer; SAMIndex: Integer; BaudIndex: Integer;Protocol: Integer): Integer;stdcall;external YOWOREADERDLL;
Public Declare Function YW_SAM_PPSBaudEx Lib "YW60x.dll" (ByVal ReaderID As Long, ByVal SAMIndex As Long, ByVal BaudIndex As Long, ByVal Protocol As Long) As Long
public int YW_SAM_PPSBaudEx(int ReaderID,int SAMIndex, int BaudIndex, int Protocol)
{
int ret;
try
{
JNative fuc = new JNative("YW60x.dll", "YW_SAM_PPSBaudEx");
fuc.setRetVal(Type.INT);
fuc.setParameter(0, ReaderID);
fuc.setParameter(1, SAMIndex);
fuc.setParameter(2, BaudIndex);
fuc.setParameter(3, Protocol);
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_SAM_PPSBaudEx(int ReaderID, int SamIndex, int BaudIndex, int Protocol);
public FUNCTION long YW_SAM_PPSBaudEx (long lReaderID , long SAMIndex , long BaudIndex , long Protocol ) library "YW60x.dll"