public static int ConnectSerial(string szPortName, int nBaudRate, int nDataBits, int nParity, int nStopBits) { if (Is64Bit()) { return(BXLAPI_x64.ConnectSerial(szPortName, nBaudRate, nDataBits, nParity, nStopBits)); } else { return(BXLAPI_x86.ConnectSerial(szPortName, nBaudRate, nDataBits, nParity, nStopBits)); } }