public bool StartHighSpeedDataCommunication(byte bySendPos)
        {
            if ((status & ObjectLJV7.STATUS.HighSpeedDataCommunication) > 0)
            {
                MessageBox.Show("連線已建立");
                return(false);
            }
            if ((status & ObjectLJV7.STATUS.CommunicationInitalize) == 0)
            {
                MessageBox.Show("連線未初始化");
                return(false);
            }

            //Console.WriteLine(DateTime.Now.TimeOfDay + ": StartHighSpeedDataCommunication");
            buffer_set.Clear();

            // Initialize data.
            Rc rc = Rc.Ok;

            // High-speed data communication start prep
            LJV7IF_HIGH_SPEED_PRE_START_REQ req = new LJV7IF_HIGH_SPEED_PRE_START_REQ();

            req.bySendPos = bySendPos;

            LJV7IF_PROFILE_INFO profileInfo = new LJV7IF_PROFILE_INFO();

            rc = (Rc)NativeMethods.LJV7IF_PreStartHighSpeedDataCommunication(DEVICE_ID, ref req, ref profileInfo);
            if (!CheckReturnCode(rc))
            {
                return(false);
            }

            // Start high-speed data communication.
            rc = (Rc)NativeMethods.LJV7IF_StartHighSpeedDataCommunication(DEVICE_ID);
            if (!CheckReturnCode(rc))
            {
                return(false);
            }

            status |= ObjectLJV7.STATUS.HighSpeedDataCommunication;
            return(true);
        }
 internal static extern int LJV7IF_PreStartHighSpeedDataCommunication(
     int lDeviceId, ref LJV7IF_HIGH_SPEED_PRE_START_REQ pReq,
     ref LJV7IF_PROFILE_INFO pProfileInfo);