tags:

views:

54

answers:

2

I'm trying to write a remote control application which should allow a user to control a pc with a wireless device. It should be possible to use the device for example as game controller. I've got the advice to create a virtual device but I couldn't find any information on how to do that. What possibilities do I have to do that in Java or .Net?

+1  A: 

It's going to be hard. The idea of a "virtual device" is that most Operating Systems don't talk directly to the hardware. They talk to device drivers. A "virtual device" describes what happens when a device driver claims there's hardware, yet none is physically present.

Now, you don't actually need a virtual device. You have real hardware. You can write a real device driver for a real device. You'd need the UMDF (User Mode Driver Framework) for that, which defines a COM interface for device drivers, and write a .NET application implementing that COM interface.

MSalters
He will likely need a virtual device. The real device is wireless. And unless he has a specific hardware in his PC tat responds to JUST this wireless device it will need to be a virtual device driver.
Foxfire
Hard to tell, actually. Is the mouse driver for a Bluetooth mouse a virtual device driver? I'd say no. The mouse definitely needs a mouse driver; the Bluetooth driver isn't going to work. The premise is wrong anyway: device drivers almost always use a layered model, in which case lower-layer drivers need not respond to just one device. E.g. USB bus driver.
MSalters
A: 

I guess you are talking about a virtual device driver.

With Java there is absolutely no way to do that. There has been some speculation that in UMDF (User mode driver framework) it might be possible to use .Net to develop that, but I never saw any concrete approach. So this is likely purely academic.

So the answer is likely you have no possiblilities to develop it in C# or Java.

User Mode Driver Framework (likely best suited for developing a virtual device driver as you seem to want) home at Microsoft

If the device itself is programmable (a game controler most likely isn't) you could use standard networking methods to interface between the device and the computer. In that case using .Net or Java should not be a problem.

Foxfire