Exemple #1
0
        public bool WriteOutput()
        {
            int bytesWritten = 0;

            if (_Outputs.RptByteLen == 0)
            {
                return(false);
            }
            if (!RwAccessible)
            {
                return(false);
            }

            _Outputs.DataBuf[0] = _Outputs.ID;

            fixed(byte *buf = _Outputs.DataBuf)
            {
                return(PInvoke.WriteFile(_hDevice, _Outputs.DataBuf, _Outputs.RptByteLen, ref bytesWritten, IntPtr.Zero));
            }

            //return PInvoke.WriteFile(_hDevice, ref _Outputs.DataBuf[0], _Outputs.RptByteLen, ref bytesWritten, IntPtr.Zero);
        }