Пример #1
0
    // Token: 0x060000E7 RID: 231 RVA: 0x00006310 File Offset: 0x00004510
    private int _getFunction(int idx, ref string serial, ref string funcId, ref string funcName, ref string funcVal, ref string errmsg)
    {
        List <uint> functions = null;

        YAPI.YDevice dev      = null;
        int          devdescr = 0;
        int          res      = base._getDevice(ref dev, ref errmsg);

        if (YAPI.YISERR(res))
        {
            base._throw(res, errmsg);
            return(res);
        }
        res = dev.getFunctions(ref functions, ref errmsg);
        if (YAPI.YISERR(res))
        {
            return(res);
        }
        int fundescr = Convert.ToInt32(functions[idx]);

        res = YAPI.yapiGetFunctionInfo(fundescr, ref devdescr, ref serial, ref funcId, ref funcName, ref funcVal, ref errmsg);
        if (YAPI.YISERR(res))
        {
            return(res);
        }
        return(0);
    }
Пример #2
0
    // Token: 0x060000E8 RID: 232 RVA: 0x00006394 File Offset: 0x00004594
    public int functionCount()
    {
        List <uint> functions = null;

        YAPI.YDevice dev    = null;
        string       errmsg = "";
        int          res    = base._getDevice(ref dev, ref errmsg);

        if (YAPI.YISERR(res))
        {
            base._throw(res, errmsg);
            return(res);
        }
        res = dev.getFunctions(ref functions, ref errmsg);
        if (YAPI.YISERR(res))
        {
            functions = null;
            base._throw(res, errmsg);
            return(res);
        }
        return(functions.Count);
    }