Exemple #1
0
        public virtual DllErrorCode StatusRead(Byte[] pInputBuffer, uint nBytesInInputBuffer, Byte[] pOutputBuffer, out UInt32 nBytesReturned)
        {
            UInt32[]     len = new UInt32[1];
            UInt32       nBytesInOutputBuffer = (UInt32)pOutputBuffer.GetLength(0);
            DllErrorCode retVal = (DllErrorCode)_StatusRead(pInputBuffer, nBytesInInputBuffer, pOutputBuffer, nBytesInOutputBuffer, len);

            nBytesReturned = len[0];
            return(retVal);
        }
Exemple #2
0
        public virtual DllErrorCode GetRawData(Byte[] pOutputBuffer, out UInt32 nBytesReturned)
        {
            UInt32[]     len = new UInt32[1];
            UInt32       nBytesInOutputBuffer = (UInt32)pOutputBuffer.GetLength(0);
            DllErrorCode retVal = (DllErrorCode)_GetRawData(pOutputBuffer, nBytesInOutputBuffer, len);

            nBytesReturned = len[0];
            return(retVal);
        }
Exemple #3
0
        public virtual DllErrorCode SetupPermissionWrite(Byte[] pInputBuffer, Byte[] pOutputBuffer, out UInt32 nBytesReturned)
        {
            UInt32[]     len = new UInt32[1];
            UInt32       nBytesInInputBuffer  = (UInt32)pInputBuffer.GetLength(0);
            UInt32       nBytesInOutputBuffer = (UInt32)pOutputBuffer.GetLength(0);
            DllErrorCode retVal = (DllErrorCode)_SetupPermissionWrite(pInputBuffer, nBytesInInputBuffer, pOutputBuffer, nBytesInOutputBuffer, len);

            nBytesReturned = len[0];
            return(retVal);
        }
Exemple #4
0
        public virtual DllErrorCode GetDllVersion(out String Version)
        {
            UInt32 length;

            Byte[] buffer = new Byte[MaxStrLength];

            Version = null;
            DllErrorCode result = (DllErrorCode)_GetDllVersion(buffer, MaxStrLength, out length);

            if (result == DllErrorCode.NO_ERROR)
            {
                int index = Array.IndexOf <byte>(buffer, 0);
                Version = System.Text.Encoding.ASCII.GetString(buffer, 0, index);
            }
            return(result);
        }