RawInput /Raw Input / WM_INPUT Examples
Moderator: Moderators
-
- Posts: 1
- Joined: Tue Dec 09, 2014 2:08 am
Re: RawInput /Raw Input / WM_INPUT Examples
Hey,
i want to write a DLL which is loaded by an other application ("V-rep") in C++11. Therefor i need to read button events and movement data from the spacemouse.
Sadly, I am not allowed to use unicode (have to use multybyte). Also I have no handle to the window (hwnd). "V-Rep" uses OpenGL and Qt.
So far I poked around in the two given samples of the sdk. Added the includes and the correct libs, but encountered a variaty of different dead-ends so far.
Does anyone have any recommendations which exampleproject I should try to adapt from to or additional documentation?
I never worked this close the hardware before. No idea how I can access data from a driver (or even the background service!?)
Best regards
Prometheus
i want to write a DLL which is loaded by an other application ("V-rep") in C++11. Therefor i need to read button events and movement data from the spacemouse.
Sadly, I am not allowed to use unicode (have to use multybyte). Also I have no handle to the window (hwnd). "V-Rep" uses OpenGL and Qt.
So far I poked around in the two given samples of the sdk. Added the includes and the correct libs, but encountered a variaty of different dead-ends so far.
Does anyone have any recommendations which exampleproject I should try to adapt from to or additional documentation?
I never worked this close the hardware before. No idea how I can access data from a driver (or even the background service!?)
Best regards
Prometheus
Re: RawInput /Raw Input / WM_INPUT Examples
You do have many options.
If you are injecting your DLL, or getting V-rep to load it, you probably don't have control over the window that will be in focus. The events are delivered though that window.
You need other options.
a) You can often get the hwnd of the main window and break into that window's event loop to look at the messages that it is receiving. There are Windows ways of doing this and usually APIs expose something similar. If you can do this you can use any of the APIs that require an hwnd. Such as the 3DxWare API (SiOpen...).
b) You create your own window. Even though it doesn't get displayed, it still can get events.
c) You can use an API that doesn't require an hwnd, such as HID.
d) You can create your own IPC mechanism, such as named pipes, and tell the driver to use it when v-rep is in focus.
If you are injecting your DLL, or getting V-rep to load it, you probably don't have control over the window that will be in focus. The events are delivered though that window.
You need other options.
a) You can often get the hwnd of the main window and break into that window's event loop to look at the messages that it is receiving. There are Windows ways of doing this and usually APIs expose something similar. If you can do this you can use any of the APIs that require an hwnd. Such as the 3DxWare API (SiOpen...).
b) You create your own window. Even though it doesn't get displayed, it still can get events.
c) You can use an API that doesn't require an hwnd, such as HID.
d) You can create your own IPC mechanism, such as named pipes, and tell the driver to use it when v-rep is in focus.
Re: RawInput /Raw Input / WM_INPUT Examples
Hi,
i am new here.
Where to find the code examples?
The FTP server is still not active, how to get the sample code?
Thanks for informations.
i am new here.
Where to find the code examples?
The FTP server is still not active, how to get the sample code?
Thanks for informations.
Re: RawInput /Raw Input / WM_INPUT Examples
Thanks @UtaSH
I want the minimum installation.
My wishes are
-no 3dconnexion installation (from CD or something else)
-only start my EXE
-i don't the have the automatic "drifting"-reset
-i want to work with the 3D wireless Spacemouse
-Developing Enviroment is Visual C++ 6.0 or Visual C++ 2008
-is it possible with "HID"-code?
-needed functions: translation,rotation,batterie,reset
Is it possible to get this, or more details how to do?
Thanks
I want the minimum installation.
My wishes are
-no 3dconnexion installation (from CD or something else)
-only start my EXE
-i don't the have the automatic "drifting"-reset
-i want to work with the 3D wireless Spacemouse
-Developing Enviroment is Visual C++ 6.0 or Visual C++ 2008
-is it possible with "HID"-code?
-needed functions: translation,rotation,batterie,reset
Is it possible to get this, or more details how to do?
Thanks
Re: RawInput /Raw Input / WM_INPUT Examples
Yes, you can do all that with HID. The driver uses HID to talk to the device.
RawInput is easier to use. But you won't get battery information through it. You only get translation and rotations.
RawInput is easier to use. But you won't get battery information through it. You only get translation and rotations.
Re: RawInput /Raw Input / WM_INPUT Examples
@jwick Thanks for Information.
Ok, nice.
Can you send me sourcecode sample with HID communication in Visual C++?
Ok, nice.
Can you send me sourcecode sample with HID communication in Visual C++?
-
- Posts: 1
- Joined: Tue May 10, 2016 8:33 am
Re: RawInput /Raw Input / WM_INPUT Examples
Hi there,
I'm working on an app that needs to process input from 1 or more of your 3D mice and will send that information via OSC to any listening applications. The crux of this approach is that the application that is receiving this input will lose focus, so I believe I can't use the hwnd approach in your SDK. I've read in your forums and it appears that using raw input, by interfacing directly with the HID is the way to go for this problem in Windows. Can you send me the links necessary to access these examples?
Thank you.
I'm working on an app that needs to process input from 1 or more of your 3D mice and will send that information via OSC to any listening applications. The crux of this approach is that the application that is receiving this input will lose focus, so I believe I can't use the hwnd approach in your SDK. I've read in your forums and it appears that using raw input, by interfacing directly with the HID is the way to go for this problem in Windows. Can you send me the links necessary to access these examples?
Thank you.
Re: RawInput /Raw Input / WM_INPUT Examples
Hello,
I have got the same problem. I must use the SpaceNavigator with the Windows Raw Input API, the FTP is not available anymore, is there any example ?
Thank you.
I have got the same problem. I must use the SpaceNavigator with the Windows Raw Input API, the FTP is not available anymore, is there any example ?
Thank you.
Re: RawInput /Raw Input / WM_INPUT Examples
Can anyone post the link to WM_INPUT example for HID?
Is there any example how to translate the Translation and Rotation into the camera's transformations?
That will be fruitful to see how it works like in your Navigation Demo, including the handling of the Rotation Center.
Is there any example how to translate the Translation and Rotation into the camera's transformations?
That will be fruitful to see how it works like in your Navigation Demo, including the handling of the Rotation Center.
Re: RawInput /Raw Input / WM_INPUT Examples
I'm trying to read controller data from the Windows' Raw Input API data structures, but have had no luck so far. Where should I specifically look and what should I expect to find? My device is SpaceTraveler3 USB (USB\VID_046D&PID_C623&REV_0311).
Re: RawInput /Raw Input / WM_INPUT Examples
Nobody can help me? Am I in the wrong place?