hello,
I need to use the 3d mouse "SpaceMouse classic serial" in a C # application for windows xp.
I want to write a dll that can create an interface returning values read from the mouse, but all the examples I've found on your site use "SiOpenWinInit" which wants as second parameter an HWND I don't have.
is there a way to solve this problem?
thanks
use spacemouse classic serial on C#
Moderator: Moderators
That device was discontinued so long ago there are no examples in C# for it. I extemely highly recommend picking up at least a SpaceNavigator for $100. It will save you a tremendous amount of time. We have lots of examples for USB devices.
If you need to use the serial device for some reason, you'll have to access the serial port yourself and parse the data format on your own. I have no idea how to do that in C#.
If you need to use the serial device for some reason, you'll have to access the serial port yourself and parse the data format on your own. I have no idea how to do that in C#.
You need an HWND to use the Si API, but it doesn't have to be a displayed window. You can create a window w/o mapping it. You just need an event loop somewhere so the driver has someplace to send the messages from the device to your app. You can create an HWND even for a console app.
If you read the serial port, you don't need an HWND because you won't be using the driver.
If you read the serial port, you don't need an HWND because you won't be using the driver.