Windows example to read the SpaceNavigator

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
WIREDduns
Posts: 3
Joined: Sat May 05, 2007 1:25 pm

Windows example to read the SpaceNavigator

Post by WIREDduns »

Hi

is there a Windows example to read the Space Navigator
without a need for a reference to a WINDOW, that is, I want
to run some loop to read the device and forward events to a different
program.

I managed on MacOS X using the CFRunLoop call which does not
actually create a window or GUI. Is there such an example for
Microsoft Windows?

Regards
Mark
jwick
Moderator
Moderator
Posts: 3340
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Hi WIREDduns,

I think you can use the new 3Dx COM SDK to get events w/o a window handle. You can also use DirectInput or HID.

Jim
3Dx Software Development
WIREDduns
Posts: 3
Joined: Sat May 05, 2007 1:25 pm

Post by WIREDduns »

Hi Jim,

I did look at the COM SDK and its examples but both are done using
a WINDOWS handle.

I have no experience programming DirectInput or HID. An example
would be appreciated to read out part of the device to get me started.

Regards
Mark
ngomes
Moderator
Moderator
Posts: 3340
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi WIREDduns,
I did look at the COM SDK and its examples but both are done using a WINDOWS handle.
The handles are necessary since the demo is a standard Windows app but they are not necessary to connect to and receive data from the 3Dconnexion devices.
Nuno Gomes
ngraf
Posts: 1
Joined: Tue May 08, 2007 8:36 am

Post by ngraf »

Hello Jim, Nuno,
I, too, am interested in using the SpaceNavigator in my own application. I would like to read the device and make the events from the device available to a different program. I do not want to create a Window, need a reference to a Window, or run any Windows related loop. Mark mentions that he was able to do this on MacOS X. I suppose on Windows it should be possible using calls to read USB, but I have no idea how to do this. A simple, plain vanilla C or C++ example with code to poll the device would be great. Even better would be an example of how to do this from a Java application, but given the former I can handle the latter.
Thanks,
Norman
ngomes
Moderator
Moderator
Posts: 3340
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi ngraf,

Currently, we have no sample that exemplifies how to connect through HID.

You can use our SDK (old and current) from a Java app. There are some examples using JNI lying around and have been referred to elsewhere on this Forum.
Brammel
Posts: 3
Joined: Wed May 09, 2007 1:41 am

Post by Brammel »

If you just don't want to see the window you can do this in JAVA:

Code: Select all

MainFrame m = new MainFrame(new HelloUniverse(), 256,256);
m.setVisible(false);
Then the window is completely invisible and removed from the taskbar.
jwick
Moderator
Moderator
Posts: 3340
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Hi Brammel,

There is a HID example referenced in this post.

Jim
3Dx Software Development
Post Reply