コード例 #1
0
        static private int HID_ENUM(uint vid, uint pid, out int pcnt)
        {
#if true//2019.08.23()
            if ((G.AS.DEBUG_MODE & 1) != 0)
            {
                DBGMODE.HID_ENUM(vid, pid, out pcnt);
                return(1);
            }
#endif
            int    ret;
            IntPtr buf = new IntPtr();

            buf  = Marshal.AllocHGlobal(4);
            ret  = _HID_ENUM(vid, pid, buf);;
            pcnt = Marshal.ReadInt32(buf);
            Marshal.FreeHGlobal(buf);

            return(ret);
        }