int stdcall YW_TCPIPConnectReader(
char *IPAddress,
int Port)
参数 |
类型 |
方向 |
含义 |
IPAddress |
char * |
IN |
目标读卡器的IP地址 |
Port |
int |
OUT |
读卡器的TCPIP端口号,读卡器默认23 |
extern "C" __declspec(dllimport) int __stdcall YW_TCPIPConnectReader(char *IPAddress, int Port);
function YW_TCPIPConnectReader(IPAddress: PChar;Port: Integer): Integer;stdcall;external 'YW60x.dll';
Public Declare Function YW_TCPIPConnectReader Lib "YW60x.dll" (ByVal IPAddress As String, ByVal Port As Integer) As Long
public int YW_TCPIPConnectReader(Pointer IPAddress,int Port)
{
int ret;
try
{
JNative fuc = new JNative("YW60x.dll", "YW_TCPIPConnectReader");
fuc.setRetVal(Type.INT);
fuc.setParameter(0, IPAddress);
fuc.setParameter(1,Port);
fuc.invoke();
ret = fuc.getRetValAsInt();
}
catch(NativeException e)
{
ret = -11;
}
catch(IllegalAccessException e)
{
ret = -21;
}
return ret;
}
[DllImport("YW60x.dll")]
public static extern int YW_TCPIPConnectReader(char[] IPAddress, int Port);
public FUNCTION long YW_TCPIPConnectReader(string IPAddress, long Port) library "YW60x.dll"