예제 #1
0
        public int GetTargetInfo(out CCAPI.TargetInfo Info)
        {
            Info = new CCAPI.TargetInfo();
            int[] array       = new int[2];
            int   fw          = 0;
            int   ccapi       = 0;
            int   consoleType = 0;
            ulong sysTable    = 0uL;
            int   num         = CCAPI.getFirmwareInfo(CCAPI.System.connectionID, ref fw, ref ccapi, ref sysTable, ref consoleType);
            int   num2;
            int   result;

            if (num >= 0)
            {
                CCAPI.CCAPIGlobalPointer cCAPIGlobalPointer = new CCAPI.CCAPIGlobalPointer(Marshal.AllocHGlobal(8));
                num = CCAPI.getTemperature(CCAPI.System.connectionID, cCAPIGlobalPointer.GetPtr());
                if (num < 0)
                {
                    num2   = num;
                    result = num2;
                    return(result);
                }
                IntPtr unBuf = cCAPIGlobalPointer.GetPtr();
                for (uint num3 = 0u; num3 < 2u; num3 += 1u)
                {
                    unBuf = this.ReadDataFromUnBufPtr <int>(unBuf, ref array[(int)((uint)((UIntPtr)num3))]);
                }
                this.CompleteInfo(ref Info, fw, ccapi, sysTable, consoleType, array[0], array[1]);
                this.CompleteInfo(ref this.pInfo, fw, ccapi, sysTable, consoleType, array[0], array[1]);
            }
            num2   = num;
            result = num2;
            return(result);
        }
예제 #2
0
        public int GetProcessList(out uint[] processIds)
        {
            uint num = 0u;

            CCAPI.CCAPIGlobalPointer cCAPIGlobalPointer = new CCAPI.CCAPIGlobalPointer(Marshal.AllocHGlobal(256));
            int processList = CCAPI.getProcessList(CCAPI.System.connectionID, ref num, cCAPIGlobalPointer.GetPtr());

            processIds = new uint[num];
            if (this.SUCCESS(processList))
            {
                IntPtr unBuf = cCAPIGlobalPointer.GetPtr();
                for (uint num2 = 0u; num2 < num; num2 += 1u)
                {
                    unBuf = this.ReadDataFromUnBufPtr <uint>(unBuf, ref processIds[(int)((uint)((UIntPtr)num2))]);
                }
            }
            return(processList);
        }