AForge.Controls.JoystickAPI.joyGetNumDevs C# (CSharp) Метод

joyGetNumDevs() приватный Метод

private joyGetNumDevs ( ) : int
Результат int
        public static extern int joyGetNumDevs( );

Usage Example

Пример #1
0
        public static List <DeviceInfo> GetAvailableDevices()
        {
            List <DeviceInfo> list = new List <DeviceInfo>();
            int cbjc = Marshal.SizeOf(typeof(JoystickAPI.JOYCAPS));
            int num  = JoystickAPI.joyGetNumDevs();

            for (int i = 0; i < num; i++)
            {
                JoystickAPI.JOYCAPS jOYCAPS = new JoystickAPI.JOYCAPS();
                if (JoystickAPI.joyGetDevCapsW(i, jOYCAPS, cbjc) == JoystickAPI.ResultCode.NoError)
                {
                    list.Add(new DeviceInfo(i, jOYCAPS));
                }
            }
            return(list);
        }
All Usage Examples Of AForge.Controls.JoystickAPI::joyGetNumDevs