public static int ZR_FindReader([In][MarshalAs(UnmanagedType.LPArray)] ZP_PORT_ADDR[] pPorts, int nPCount, [MarshalAs(UnmanagedType.LPStruct)] ref ZR_RD_INFO pInfo, ref ZP_PORT_INFO pPort, [In][MarshalAs(UnmanagedType.LPStruct)] ZP_WAIT_SETTINGS pWS = null, UInt32 fUpdate = ZPIntf.ZP_SF_UPDATE) { int nRes, nSize; nSize = Marshal.SizeOf(pInfo); IntPtr pnt = Marshal.AllocHGlobal(nSize); try { nRes = ZPIntf.ZP_FindSerialDevice(0x19, pPorts, nPCount, pnt, nSize, ref pPort, pWS, fUpdate); pInfo = (ZR_RD_INFO)Marshal.PtrToStructure(pnt, typeof(ZR_RD_INFO)); } finally { Marshal.FreeHGlobal(pnt); } return(nRes); }
public static extern int ZR_Rd_GetInformation(IntPtr hHandle, ref ZR_RD_INFO pInfo);
public static extern int ZR_Rd_Open(ref IntPtr pHandle, ref ZR_RD_OPEN_PARAMS pParams, [In, Out][MarshalAs(UnmanagedType.LPStruct)] ZR_RD_INFO pInfo = null);