public void OpenPort(string comPortName)
        {
            _serialPort = comPortName;
            handle      = WBM5000.CommOpen(comPortName);
            byte error;

            WBM5000.WBM5000_CardMove(handle, MoveType.Front, out error);
            WBM5000.WBM5000_CardIN(handle, CardInType.OnlyMagnetic, 0x30, out error);
        }
        private void PerformForwardEject()
        {
            byte error;

            int status;

            status = WBM5000.WBM5000_CardMove(handle, MoveType.Front, out error);
            while (status != 0 && status != -1)
            {
                status = WBM5000.WBM5000_CardMove(handle, MoveType.Front, out error);
            }
            WBM5000.WBM5000_SensorState(handle, sensorBytes, out error);
        }