Skip to main content
GameDev.net gamedev.net
🔒 Locked

[.net] Human Interface Device in C#

Started by eleusive Jul 26, 2004 at 6:15 PM 5 replies 5.2k views
Original Post
eleusive
eleusive
I was wondering if there was a .NET library or something that includes API's for Human Interface Devices in C#? What I want to do is develop an interface to talk to a USB device that acts as a HID. I know that this isn't very hard in C++, but I would prefer that the whole app is written in C#, rather than using C++ for the low-level data transmissions and C# for the actual interface. Thanks.
"What are you trying to tell me? That I can write an O(N^2) recursive solution for a 2-dimensional knapsack?" "No, programmer. I'm trying to tell you that when you're ready, you won't have to." -Adapted from "The Matrix"
Washu
Washu
Moved to .net forum
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
JesseT
JesseT
Try looking at the Microsoft.DirectX.DirectInput namespace, which is a part of the Managed DirectX 9.0 SDK. It will give you access to everything you need. Make sure to download the DirectX 9.0 SDK 2004 Summer Update which was released just the other day.
JesseT
JesseT
Almost forgot, the Longhorn SDK has a namespace called System.Windows.Input which replaces all of the old Win32 input device APIs.
eleusive
eleusive
Do you need a special version of .NET to run programs built on the longhorn SDK? Also, I would prefer not to take the DX path, as I am looking to build an application and not a game.
"What are you trying to tell me? That I can write an O(N^2) recursive solution for a 2-dimensional knapsack?" "No, programmer. I'm trying to tell you that when you're ready, you won't have to." -Adapted from "The Matrix"
JesseT
JesseT
Quote:
Original post by eleusive
Do you need a special version of .NET to run programs built on the longhorn SDK? Also, I would prefer not to take the DX path, as I am looking to build an application and not a game.


Yes, you need to be running the Windows Longhorn operating system which is only available to MSDN subscribers, in order to use the Longhorn SDK. So you're out of luck until it comes out, but keep your head up when it is released.

Now, what's wrong with using DirectX for non-game applications? DirectX is an integral part of the Windows operating system and it is meant to be used for all multimedia applications.
Winamp, Photoshop, 3DSMax, and Internet Explorer are all examples of non-game applications that use DirectX. And the US Military has vehicle and weapons simulators that use DirectX and off-the-shelf consumer components to provide a complete simulation experience for its combat personal.

DirectX isn't just for games, and it's certainly not child's play. If you want full access to user input and feedback devices under Windows, USB or otherwise, DirectInput is the best and only route to take. The APIs are far more extensive than anything else I have seen on Windows and various Unix operating systems.

So don't feel bad about having to use DirectX.

- Jesse Towner
eleusive
eleusive
Well it's not really a matter of me not wanting to use DX, its more of a matter of the people i'm working with, but I'll take a look at DInput and see if I can convince some people [grin] Thanks for the replys.
"What are you trying to tell me? That I can write an O(N^2) recursive solution for a 2-dimensional knapsack?" "No, programmer. I'm trying to tell you that when you're ready, you won't have to." -Adapted from "The Matrix"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.