Handling device events with Delphi

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

Moderator: Moderators

Post Reply
Neisa
Posts: 6
Joined: Wed Oct 24, 2007 7:02 am

Handling device events with Delphi

Post by Neisa »

Sorry for the silly question, but C++ SDK uses __hook function to associate events with handlers. How can it be done with delphi?
Thanks in advance :)
ngomes
Moderator
Moderator
Posts: 3344
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi Neisa,

Not a silly question at all. Just search on this forum (developer's for Windows) for the term "delphi". There are others that have provided a solution.
Nuno Gomes
Neisa
Posts: 6
Joined: Wed Oct 24, 2007 7:02 am

Post by Neisa »

Hi ngomes,
I've read everything on the delphi subject on this forum. Unfortunately, I found only a promise of forthcoming SDK for pascal developers. Is it available now? It was said to come out on the first quarter of 2007... :(
Another way is to use a ready solution, offered by CCrDude (my special thanks to you :wink: ), and it works great, but I'm trying to solve it on my own. That's why a little piece of manual would be really useful! :lol:
ngomes
Moderator
Moderator
Posts: 3344
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi Neisa,

You can use COM in Delphi. The 3DxInput COM server implements standard COM interfaces. I suggest you look up information on how to use COM objects in Delphi.
Neisa
Posts: 6
Joined: Wed Oct 24, 2007 7:02 am

Post by Neisa »

Huh, that's the thing I'm doing now 8)
But can you please tell me what about delphi sdk? Is it unreasonable to wait for it?
Thank you for replies :)
ngomes
Moderator
Moderator
Posts: 3344
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Neisa wrote:But can you please tell me what about delphi sdk? Is it unreasonable to wait for it?
Sorry but we do not know. You're going to have to ask the developer.

If you mean this post, then it is just a reference to the 3DxInput COM server as discussed before.
Neisa
Posts: 6
Joined: Wed Oct 24, 2007 7:02 am

Post by Neisa »

Oh, I see... so, I just misunderstood that post. Thank you!
Neisa
Posts: 6
Joined: Wed Oct 24, 2007 7:02 am

Post by Neisa »

Another question: does the sensor offsets differ for rotations an translations? SDK says that offset values are -MAX..MAX in all cases, but in fact I receive values in -1..1 for rotations and -MAX..MAX for translations.
jwick
Moderator
Moderator
Posts: 3341
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

The rotation is separated into two parts: the direction cosines of the axis of rotation and the angle around that axis. You have to combine the axis and angle to get the total rotation. I think there is a method to do that.
Post Reply