VB6接口与USB [英] VB6 Interface with USB

查看:262
本文介绍了VB6接口与USB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一种方式来做到这一切围绕着互联网,也没有带回来了,所以这就是我希望做的:

I have been looking for a way to do this all around the internet and have not come back with much, so this is what i'm looking to do:

我有USB游戏控制器。我想用这个控制器上的按钮,例如,如果我打的三角按钮我的应用程序做一些事情来控制我的应用程序。我做了使用COM控件之前的方案,但该设备不安装本身作为一个串行设备,只有一个USB接口,所以任何人都对我如何能够通过HID类USB设备读取的数据的建议吗?或许,用直接输入?

I have USB game controller. I want to control my application using the buttons on this controller, example if i hit the triangle button my application does something. I have done programs before using COM control but this device does not mount itself as a serial device, only a USB, so anyone have any advice on how I can read data through a HID-class USB device? Perhaps using Direct input?

推荐答案

您可以直接使用HID API,但它是一个PITA。最好的办法是使用DirectX。 见DirectX4VB库和网站(我们使用) http://directx4vb.vbgamer.com/DirectX4VB/Tutorials/DirectX7/DI_Joystick.asp

You can use the HID API directly but it's a PITA. The best option is to use DirectX. See the DirectX4VB libraries and website (which we use) http://directx4vb.vbgamer.com/DirectX4VB/Tutorials/DirectX7/DI_Joystick.asp

请注意,我只从VB6中使用它,而不是.NET。

这篇关于VB6接口与USB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆