No events in VS2005

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

Moderator: Moderators

Post Reply
mbrady
Posts: 6
Joined: Wed Oct 10, 2007 3:48 am
Location: Australia

No events in VS2005

Post by mbrady »

Ok, I'm sure I'm doing something really stupid. I'm trying to get some older code working which uses the old C SDK.

I can build and run the samples in VS2005... but they do not respond to any events from the 3DX device. SiGetEvent does not return SI_IS_EVENT.

However, if I run the sample app from outside of VS2005, everything works fine. Is VS2005 somehow preventing the messages from the 3Dx device from getting to the applications message pump?

Thanks in advance.
jwick
Moderator
Moderator
Posts: 3341
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Haven't heard of that before. The first thing to check is whether your application's window is in the foreground and has keyboard focus. Then turn on the driver's Log File and see if your application is being recognized.

Jim
3Dx Software Development
mbrady
Posts: 6
Joined: Wed Oct 10, 2007 3:48 am
Location: Australia

Post by mbrady »

Aha! Thanks for the tip (I didn't even realise that the 3Dx driver had logging functionality).

The log file indicates that the application is indeed connecting with the driver... however, there are a lot of the following messages:

Code: Select all

17:54:29.527: s80trans:UdTransSendEvent: Error: Buffer full.  Ignoring new event type=2.  Resignaling last event.
Can anyone think why I would be getting a buffer full when I execute the demo from within VS2005 (release or debug builds are both affected), but when I execute the demo from outside VS2005, everything works fine?

Thanks again.
ngomes
Moderator
Moderator
Posts: 3344
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi mbrady,

It seems that your code is not emptying the message queue. This is done by calling SiGetEvent() from within the callback handler for the registered message ("SpaceWareMessage00").

Try tracing the calls to that handler. See if it being called when you grab the 3D mouse.
Nuno Gomes
mbrady
Posts: 6
Joined: Wed Oct 10, 2007 3:48 am
Location: Australia

Post by mbrady »

I've resorted to testing the cityfly demo that comes with the SDK. I get exactly the same behaviour with this demo (compiled under VS2005).

There is definately a call to SiGetEvent in the message queue in this demo.
jwick
Moderator
Moderator
Posts: 3341
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Are you building the release or debug mode? Are you waiting at a break point?
mbrady
Posts: 6
Joined: Wed Oct 10, 2007 3:48 am
Location: Australia

Post by mbrady »

I've tried debug (with and without breakpoints) and release mode, doesn't seem to make any difference (i.e. SiGetEvents never returns SI_IS_EVENT).

I've got version 3.3.6 of the 3DxWare, and I'm trying to use a SpaceNavigator.
mbrady
Posts: 6
Joined: Wed Oct 10, 2007 3:48 am
Location: Australia

Post by mbrady »

ok... feel stupid now.

I just upgraded to the latest driver (after realising I didn't have the latest).... it all seems to work fine now.
jwick
Moderator
Moderator
Posts: 3341
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

I have no idea why that would have made a difference, but I'm not going to argue with success.

OTOH, I've never had problems running within VS2005. I do it all the time while debugging the driver and/or the demos.
Post Reply