YW_ComInitial
打开串口

参数列表:

 YW_ComInitial

(

int PortIndex, 

int Baud

)


参数含义:

打开读卡器串口,使用用串口读卡器,485读卡器,还有USB转串口的读卡器

PortIndex: COM口序号

 Baud:串口波特率


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

int stdcall YW_ComInitial(int PortIndex, int Baud);


Delphi声明:

function YW_ComInitial(PortIndex: Integer; Bound: Integer): Integer;stdcall;external YOWOREADERDLL;


VB声明:

Public Declare Function YW_ComInitial Lib "YW60x.dll" (ByVal PortIndex As Long, ByVal Bound As Long) As Long


JAVA声明:

public int YW_ComInitial(int PortIndex, int Baud)

{

int ret;

try

{

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

fuc.setRetVal(Type.INT);

fuc.setParameter(0, PortIndex);

fuc.setParameter(1,Baud);

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_ComInitial(int PortIndex, int Bound);


Power Builder 9 声明:

public FUNCTION long YW_ComInitial(long PortIndex , long Baud) library "YW60x.dll"


支持的RFID读写器:
YW-605RA, YW-605RB, YW-605RC, YW-605SA, YW-605SB, YW-605SC, YW-605UA, YW-605UB, YW-605UC, YW-608RA, YW-608RB, YW-608RC, YW-608SA, YW-608SB, YW-608SC, YW-608UA, YW-610SA, YW-610SB, YW-610SC, YW-602-R, YW-602-U, YW-602-3, YW-602-8, YW-655, YW-657, YW-656