Issue when trying to open the device

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

Moderator: Moderators

Post Reply
fjri
Posts: 3
Joined: Mon Aug 20, 2018 1:44 am

Issue when trying to open the device

Post by fjri »

Hey all,

I have been assigned to generate a DLL based on the current 3DxWare SDK, to later import it in our own Java environment to use the 3D space mouse.
When accessing the Initialization function from Java, the system returns an error when executing the SiOpenEx function, as

Code: Select all

if ((deviceHandle = SiOpenEx(L"spacemouse", SI_ANY_DEVICE, SI_NO_MASK, SI_EVENT, &oData)) == NULL)

returns NULL. I have a feeling it might have to do with the given "app name", which I am totally unaware of what value that should have, since the C++ project does not generate an .exe file, but .dll and .lib files.

Am I totally wrong, or does anyone around have experience on generating a DLL for their projects?

Thank you in advance, it will be really appreciated.
best,
Francesc
jwick
Moderator
Moderator
Posts: 3374
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Issue when trying to open the device

Post by jwick »

Hi fjri,

It's more likely that it has to do with the oData values. Are you supplying an HWND for a window that exists?

The first value is just an ID that may be shown to the user when your application is in focus. It may also be used to match up a cfg with your app.

Jim
fjri
Posts: 3
Joined: Mon Aug 20, 2018 1:44 am

Re: Issue when trying to open the device

Post by fjri »

Hi Jim,

thank you for your reply :) it turned out I did not supply a hidden window handler, as someone explained in another threat in this forum. The DLL is compiling correctly and I am able to capture axis movement with it in Java (woohoo).

If I may ask in this threat, I am trying to get functionality for the buttons. However, when I set the Navigator buttons to resemble the right/left click of a normal mouse, the code does not detect it as a button event... The event is only true when, i.e. after opening a radial menu, I explicitly click on one of the menu options. Is there any way to detect whether the mouse's buttons have been pressed, without any other action?

PS: this behaviour is exactly the same in the TestSiapp demo, where the button event is handled only when using an option from a radial menu :/

best,
Francesc
jwick
Moderator
Moderator
Posts: 3374
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Issue when trying to open the device

Post by jwick »

Hi,

I don't fully understand the question.

If you assign the buttons in the GUI to generate 2D mouse events, your application will not be notified when the user presses the button. Currently they will be sent to only one place (to the system as a 2D mouse event instead of to your app as a 3D mouse button event). Your app gets one or the other.

Is this what you are referring to?

Jim
fjri
Posts: 3
Joined: Mon Aug 20, 2018 1:44 am

Re: Issue when trying to open the device

Post by fjri »

Yes, that was what I was referring to. In the end, I decided to set the buttons for increase/decrease sensitivity, which might benefit other users.

So far everything is working like a charm. Thank you for your input!

Best,
Francesc
Post Reply