How to distribute a custom cfg.xml?

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

Moderator: Moderators

Post Reply
mliebig
Posts: 9
Joined: Mon Oct 20, 2014 10:00 pm

How to distribute a custom cfg.xml?

Post by mliebig » Wed Oct 28, 2020 7:45 am

Hi,

we deliver our custom XML file for our software.

It seems that the installation we're doing confuses the 3dconnexion software.

Background: What we're doing currently: We wrap the 3DxWinCore32/64.msi into our setup and after executing the correct msi, we copy out custom XML to <3dxware-HomeDirectory>\Cfg\ - the home directory is extracted from the registry. With a manual process it is also reproducible, so this is what I'm referring to from now on.

Repro (with 3DxWinCore version 17.7.0):
  • I install 3dxwincore64.msi (on a 64 bit windows 10).
  • I copy the dBLab.xml as Admin to C:\Program Files\3Dconnexion\3DxWinCore\Cfg\
  • I start our software (dblab.exe) and try to use the device
In the 3DxService.log it is stated that AppDefCfg_S80.xml is used, which is not the one I want:

Code: Select all

00000040 28/10/2020 15:17:54.923: AppSignature::Equals: ExeName dBLab.exe/PID=7936/Focus=0x30656/Cursor=0x30656/<WindowClassName>ATL:68956928</WindowClassName> does not equal /PID=7936/Focus=0x0/Cursor=0x0/
00000040 28/10/2020 15:17:54.924: CheckForChangeThread:CheckForFocusAppSignatureChange: App changed from dBLab.exe/PID=7936/Focus=0x30656/Cursor=0x30656 to /PID=7936/Focus=0x0/Cursor=0x0
00000040 28/10/2020 15:17:54.925: CheckForChange.cpp:CheckForChangeMethod: lastApp is /PID=7936/Focus=0x0/Cursor=0x0 newApp is /PID=7936/Focus=0x0/Cursor=0x0
00020000 28/10/2020 15:17:54.972: Driver Si: Call to MMapSiOpen
00020000 28/10/2020 15:17:54.974: Dvr:dvrsi.c:MMapSiOpenEx: sizeof(devID)=4, sizeof(pTMask)=08, sizeof(mode)=4, sizeof(oData.hWnd)=8, sizeof(oData.transCtl)=8, sizeof(eventMask)=4, sizeof(oData.libFlag)=4, sizeof(oData.hints)=16, oData.hints.hintSize=0
00020000 28/10/2020 15:17:54.974: Dvr:dvrsi.c:MMapSiOpenEx: pAppName=KlippelManualSweep, devID=-1, pTMask=0x834ff120, mode=1, oData.hWnd=0x1b0332, oData.transCtl=0, eventMask=0x1f, libFlag=0
00020000 28/10/2020 15:17:54.975: MMapDvrConnect: Trying to open mmap name=SpaceWareMemMap01
00020000 28/10/2020 15:17:54.976: MMapDvrConnect: using mmap name=SpaceWareMemMap01
00080000 28/10/2020 15:17:54.977: UdCtl: Transport S80 request to open connection for app=KlippelManualSweep, hwnd=0x1b0332, exe=dBLab.exe, PID=7936, appDevID=-1.
00000040 28/10/2020 15:17:54.980: *****************UdCfgMakeNewBestFitCfgRefNode: Making a new CfgReferenceNode for dBLab.exe, using pCfgInfo->m_DisplayNameID=STR_DEFAULT_S80
00000400 28/10/2020 15:17:54.981: Cfg::Cfg(ExecutableName: ^(.*)$) Filename:C:\Program Files\3Dconnexion\3DxWinCore\Cfg\AppDefCfg_S80.xml
  • Now I erase the dblab.xml from the Cfg folder
  • start our software (where the device does not work either, which is understandable) and close it
  • Then I copy the profile back to the Cfg folder
  • and I start our software - the device can be used as expected
The log finds (a couple?) of new XML files (though I only copied one into the folder):

Code: Select all

00000040 28/10/2020 15:31:58.167: CheckForChange.cpp:CheckForChangeMethod: lastApp is explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x203a0 newApp is explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x50692
00000040 28/10/2020 15:31:58.168: AppSignature::Equals: UnderCursorWnd explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x203a0/<WindowClassName>DirectUIHWND</WindowClassName> does not equal explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x50692/<WindowClassName>DirectUIHWND</WindowClassName>
00000040 28/10/2020 15:31:58.169: CheckForChange.cpp:CheckForChangeMethod: App changed from explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x203a0 to explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x50692
00008000 28/10/2020 15:31:58.170: AppHdlList::CompleteAppSignature: distance is -2147483648 between listAppHdl.Sig (AppHdl(0X000001D0986B05E0): Name:Windows Tray - Ignored) and focusAppSig(explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x50692)
00008000 28/10/2020 15:31:58.171: AppHdlList::CompleteAppSignature: distance is -2147483648 between listAppHdl.Sig (AppHdl(0X000001D0982A84B0): Name:Windows Explorer) and focusAppSig(explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x50692)
00008000 28/10/2020 15:31:58.173: AppHdlList::CompleteAppSignature: distance is -2147483648 between listAppHdl.Sig (AppHdl(0X000001D0986AE920): Name:Desktop) and focusAppSig(explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x50692)
00008000 28/10/2020 15:31:58.174: AppHdlList::CompleteAppSignature: distance is -2147483648 between listAppHdl.Sig (AppHdl(0X000001D0982A7C10): Name:STR_3DXSERVICE) and focusAppSig(explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x50692)
00008000 28/10/2020 15:31:58.175: AppHdlList::CompleteAppSignature: distance is -2147483648 between listAppHdl.Sig (AppHdl(0X000001D09828D640): Name:Windows Desktop) and focusAppSig(explorer.exe/PID=5548/Focus=0x203a0/Cursor=0x50692)
00000040 28/10/2020 15:31:58.237: New Cfg File Found: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\3DxSDKTemplate.xml
00000002 28/10/2020 15:31:58.239: 
00000002 28/10/2020 15:31:58.240: CfgInfo::ReadFromXml(C:\Program Files\3Dconnexion\3DxWinCore\Cfg\3DxSDKTemplate.xml)
00000001 28/10/2020 15:31:58.245: CfgInfo::ReadFromXml: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\3DxSDKTemplate.xml: docType: AppCfgTemplate
00000040 28/10/2020 15:31:58.252: New Cfg File Found: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\JoystickTemplate.xml
00000002 28/10/2020 15:31:58.253: 
00000002 28/10/2020 15:31:58.254: CfgInfo::ReadFromXml(C:\Program Files\3Dconnexion\3DxWinCore\Cfg\JoystickTemplate.xml)
00000001 28/10/2020 15:31:58.260: CfgInfo::ReadFromXml: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\JoystickTemplate.xml: docType: AppCfgTemplate
00000040 28/10/2020 15:31:58.261: New Cfg File Found: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\KeyboardTemplate.xml
00000002 28/10/2020 15:31:58.264: 
00000002 28/10/2020 15:31:58.265: CfgInfo::ReadFromXml(C:\Program Files\3Dconnexion\3DxWinCore\Cfg\KeyboardTemplate.xml)
00000001 28/10/2020 15:31:58.268: CfgInfo::ReadFromXml: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\KeyboardTemplate.xml: docType: AppCfgTemplate
00000040 28/10/2020 15:31:58.269: New Cfg File Found: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\KeyboardWASDTemplate.xml
00000002 28/10/2020 15:31:58.270: 
00000002 28/10/2020 15:31:58.271: CfgInfo::ReadFromXml(C:\Program Files\3Dconnexion\3DxWinCore\Cfg\KeyboardWASDTemplate.xml)
00000001 28/10/2020 15:31:58.274: CfgInfo::ReadFromXml: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\KeyboardWASDTemplate.xml: docType: AppCfgTemplate
[b]00000040 28/10/2020 15:31:58.282: New Cfg File Found: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\dBLab.xml[/b]
00000002 28/10/2020 15:31:58.283: 
00000002 28/10/2020 15:31:58.286: CfgInfo::ReadFromXml(C:\Program Files\3Dconnexion\3DxWinCore\Cfg\dBLab.xml)
00000001 28/10/2020 15:31:58.293: CfgInfo::ReadFromXml: C:\Program Files\3Dconnexion\3DxWinCore\Cfg\dBLab.xml: docType: AppCfg
00000002 28/10/2020 15:31:58.303: Cfginfo::ReadFromXml: Default=true
00000002 28/10/2020 15:31:58.310: CfgInfo::ReadFromXml: CfgFormatVersion=1.3
00000002 28/10/2020 15:31:58.311: CfgInfo::ReadFromXml: ThisFileVersion=1.12
00000002 28/10/2020 15:31:58.313: CfgProperties::ReadFromXml: CfgProperties.ID:  dBLab
00000002 28/10/2020 15:31:58.315: CfgProperties::ReadFromXml: CfgProperties.Name:  dBLab
00000002 28/10/2020 15:31:58.319: CfgProperties::ReadFromXml: CfgProperties.InheritsFromID:  ID_Base_Cfg
00000002 28/10/2020 15:31:58.321: CfgProperties::ReadFromXml: CfgProperties.Grab:  None
00000002 28/10/2020 15:31:58.322: CfgProperties::ReadFromXml: CfgProperties.Access.ReadOnly:  true
00000002 28/10/2020 15:31:58.323: CfgProperties::ReadFromXml: CfgProperties.Access.AllowInheritance:  true
00000002 28/10/2020 15:31:58.324: CfgProperties::ReadFromXml: CfgProperties.Access.Hidden:  false
00000002 28/10/2020 15:31:58.326: CfgProperties::ReadFromXml: CfgProperties.Access.Ignore:  false
00000002 28/10/2020 15:31:58.327: CfgProperties::ReadFromXml: CfgProperties.Access.IsAppDefCfg:  true
00000002 28/10/2020 15:31:58.329: CfgSignature::ReadFromXml: AppInfo.Name: dBLab
00000002 28/10/2020 15:31:58.331: ExeNameGroup::ReadFromXml: ExecutableName: dBLab.exe
00000002 28/10/2020 15:31:58.333: Signature::ReadFromXml: AppInfo.Signature.Transport:  S80
00000002 28/10/2020 15:31:58.334: Signature::ReadFromXml: AppInfo.Signature.WindowClassName:  
00000002 28/10/2020 15:31:58.335: CfgOptions::ReadFromXml: AppInfo.Options.UseSiOpenAppName:  true
00000002 28/10/2020 15:31:58.338: CfgOptions::ReadFromXml: AppInfo.Options.SendDeviceChangeEvent:  false
00000002 28/10/2020 15:31:58.342: CfgOptions::ReadFromXml: AppInfo.Options.IgnoreMouseWheelInertia:  true
Then the correct XML file is used:

Code: Select all

Driver Si: Call to MMapSiOpen
00020000 28/10/2020 15:32:11.222: Dvr:dvrsi.c:MMapSiOpenEx: sizeof(devID)=4, sizeof(pTMask)=08, sizeof(mode)=4, sizeof(oData.hWnd)=8, sizeof(oData.transCtl)=8, sizeof(eventMask)=4, sizeof(oData.libFlag)=4, sizeof(oData.hints)=16, oData.hints.hintSize=0
00020000 28/10/2020 15:32:11.223: Dvr:dvrsi.c:MMapSiOpenEx: pAppName=KlippelManualSweep, devID=-1, pTMask=0xe48ff260, mode=1, oData.hWnd=0x180558, oData.transCtl=0, eventMask=0x1f, libFlag=0
00020000 28/10/2020 15:32:11.224: MMapDvrConnect: Trying to open mmap name=SpaceWareMemMap01
00020000 28/10/2020 15:32:11.225: MMapDvrConnect: using mmap name=SpaceWareMemMap01
00080000 28/10/2020 15:32:11.226: UdCtl: Transport S80 request to open connection for app=KlippelManualSweep, hwnd=0x180558, exe=dBLab.exe, PID=8788, appDevID=-1.
00000040 28/10/2020 15:32:11.229: *****************UdCfgMakeNewBestFitCfgRefNode: Making a new CfgReferenceNode for dBLab.exe, using pCfgInfo->m_DisplayNameID=dBLab
00000400 28/10/2020 15:32:11.230: Cfg::Cfg(ExecutableName: dBLab.exe) Filename:C:\Program Files\3Dconnexion\3DxWinCore\Cfg\dBLab.xml
My questions:
  • Did I make a mistake when creating the XML file?
  • Is something wrong with my order or installation?
  • Is there a way to update the available XML files during my installation wrapper?
The complete 3dx-logs and my profile is attached.

Thanks,
Marian
Attachments
dBLab.zip
(1.75 KiB) Downloaded 17 times
3dx_logs.zip
(31.48 KiB) Downloaded 20 times

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

Re: How to distribute a custom cfg.xml?

Post by jwick » Wed Oct 28, 2020 9:18 am

Hello Marian,

I'll admit we currently don't have a good way of having ISVs distribute cfg files.
We actively discourage it, but it should work.
One reason to discourage it is because the cfg file format changes over time and we don't have a mechanism to inform you about that, or handle multiple versions.

It's best to contact us through our ISV support page (then email). It's easier to pass files back and forth.

I'd have some questions and comments:
1) We really don't want you distributing our MSI. It makes it very difficult to do bug fixes. That being said, recent versions will tell users when an update is available from 3Dx.
2) Related to above, when a current device is attached to a user's machine, Windows should automatically guide the user to a web site to install the software. It's perhaps better to rely on that than ship a probably-old MSI.
3) Why do you want a cfg file for your app? We try to give you ways of customizing w/o distributing XML files. We can go into the details over email.
4) We'd prefer you didn't drop files into Program Files. The installers like to have complete control over those dirs. The better place is %PROGRAMDATA%\3Dconnexion\3DxWare\Cfg.
5) With the current driver you probably need to bounce 3DxService.exe if you make changes in one of the "default" directories (PF, PD). It only expects changes in the user's %appdata% dir.
6) From what I see of your cfg, your app should work with the default AppDefCfg_S80.xml cfg. The buttons won't be assigned as in your cfg file. But motion should work.
7) There may be some things in the cfg that should change (e.g., <ReadOnly>true, doesn't seem right, <IsAppDefCfg> is definitely wrong). We can clean those up with you over the ISV email.

There is no documentation on the XML format. You are not expected to be able to edit it w/o our help. It's a moving target.

mliebig
Posts: 9
Joined: Mon Oct 20, 2014 10:00 pm

Re: How to distribute a custom cfg.xml?

Post by mliebig » Thu Oct 29, 2020 12:05 am

Hi,
thanks for the response.

1) Understood. What is your suggestion how to handle custom actions (e.g. button click handled by out application instead of opening the menu) that the standard cfg does not implement? I've picked the MSI installation after a reply in this post: https://forum.3dconnexion.com/viewtopic ... 25&t=16530.
2) Agreed, but how can we avoid having the huge overhead of examples? This is not relevant for most of our customers, since we're not in the CAD business.
3) (probably related to 1) ) We've implemented our own cfg instead of using the standard one because we want to handle the buttons in our software and avoid opening the menu. If there is a way to do so, we can discuss via mail.
4) If there is a better place, I'll certainly change that. I didn't find this information, where is it available?
5) That means calling the 3DxService.exe during our installation wrapper? I'll try if it helps.
6) Handling the buttons in our software is essential...
7) Certainly. I'll try to contact you.

XML documentation: I asked this here: https://forum.3dconnexion.com/viewtopic ... 615#p36783, I figured that this does not have the highest priority...

ngomes
Moderator
Moderator
Posts: 2096
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: How to distribute a custom cfg.xml?

Post by ngomes » Thu Oct 29, 2020 6:21 am

hi mliebig,
mliebig wrote:
Thu Oct 29, 2020 12:05 am
XML documentation: I asked this here: https://forum.3dconnexion.com/viewtopic ... 615#p36783, I figured that this does not have the highest priority...
To be clear. The XML is not documented. The config files are driver use only and the schema can be expected to change from any one driver version to the other.

The driver may break if given a unexpected XML config; say, taken from an old version.
Nuno Gomes

Post Reply