Sisync functions

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

Moderator: Moderators

Post Reply
phildel
Posts: 6
Joined: Thu Dec 02, 2010 6:24 am

Sisync functions

Post by phildel »

Hello,

I want to use the sisync... functions (with siappdll.dll) and I always have the same result : SI_SYNC_WRONG_HASHCODE
For information all non sisync... functions work well
Does anybody have any ideas about this problem?

Thanks in advance.

Philippe
jwick
Moderator
Moderator
Posts: 3341
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

The hashcode is calculated by the siapp library when you get a sync request from the driver. You can't sync until you get one of these. To get one, you have to have APPLICATION_CONTROLS_BUTTONS = true in your application's .scg file (which means you need to make an scg file for your application).

Once you get a sync request event, you should be able to call the SiSync functions using that SiHdl.
phildel
Posts: 6
Joined: Thu Dec 02, 2010 6:24 am

Post by phildel »

Thanks for the replies.
Do you have an example to use this functionality?

Thanks in advance.

Philippe
phildel
Posts: 6
Joined: Thu Dec 02, 2010 6:24 am

Post by phildel »

It works, I received the sync request and after I can use the sync functions, but I need to force the selection of my configuration file in the control panel. How can I force the use of the configuration file when application start?

Thanks in advance.

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

Post by jwick »

Does your application have a window? It's window getting focus is the only way to get the driver to switch to it.
phildel
Posts: 6
Joined: Thu Dec 02, 2010 6:24 am

Post by phildel »

Yes my application has a Window.
I founded a solution, I added a SiSyncSendQuery after SiOpen and I receive the sync request, but the needed configuration must be active, is it possible by code to choose and activate a configuration among those existing?

Thanks in advance.

Philippe
jwick
Moderator
Moderator
Posts: 3341
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

No there is no way via the sync api to choose a specific scg file. The scg that is used is saved in the registry. Before you start mucking around in the registry though, the new driver doesn't use the registry, so anything you do now will be broken when 3DxWare 7 is released.

Make sure your scg file has the correct executable name. You'll have to edit it with notepad. Make sure it isn't using "*.*". Then you need to switch to it once in the GUI. The relationship of that exe to scg will be saved in the registry and it should be used next time you start your app.
phildel
Posts: 6
Joined: Thu Dec 02, 2010 6:24 am

Post by phildel »

It does work, however I don't think it advisable to let clients be able to carry out this operation, it seems more appropriate that this should be transparent for the user and should not need his intervention.

Thank you for your help.

Philippe
Post Reply