Windows 8 Metro

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

Moderator: Moderators

Post Reply
NickTh1
Posts: 3
Joined: Tue Jun 05, 2012 8:52 am

Windows 8 Metro

Post by NickTh1 »

Hi,

I have used my SpaceNavigator for a number of private projects throughout the years, and I'm very happy with the control it provides. I'm now trying to put together a Windows 8 Metro App that - if all goes well - I'm hoping to eventually publish on the Windows 8 app store. I would very much like to support the SpaceNavigator device.

The thing is, as far as I can tell, none of the old interface methods seem applicable. As the reader may know, apps must pass certification, and that includes using only the following APIs:
http://msdn.microsoft.com/en-us/library ... 11369.aspx
One can observe that:
* GetRawInputData is not supported. (Nor have I found a way to intercept WndProc (WindowInteropHelper and HwndSource from WPF seem to have vanished without replacement))
* DirectInput is not supported.
* (TDxInput presumably uses one of the above, so it would also fail certification)

There does not appear to be a predefined input device type (OrientationSensor, Inclinometer etc.) that suits the SpaceNavigator, so I'm assuming it would belong to the 'Specialized Device' category.
There is a function (CreateDeviceAccessInstance) and a couple of interfaces (IDeviceIoControl etc.) for communicating with 'specialized devices'. See:
http://msdn.microsoft.com/en-us/library ... s.85).aspx
It appears to me, however, that this API is intended for Apps that are automatically installed with the device. In the Device Metadata Package, one can specify a DeviceCompanionApplications and a PrivilegedApplication. Naively trying to use the API anyway will get you an E_ACCESSDENIED. See for example:
http://code.msdn.microsoft.com/windowsa ... e-43bde679

It really sounds too stupid to be true, and I'm hoping that I've missed or misunderstood something. Has anyone looked at getting SpaceNav support in Metro Apps?

Thanks in advance,
Niclas
NickTh1
Posts: 3
Joined: Tue Jun 05, 2012 8:52 am

Re: Windows 8 Metro

Post by NickTh1 »

My comment on TDxInput wasn't particularly well thought through, but that approach still doesn't seem viable - for other reasons.
The Win32 method CoCreateInstanceFromApp replaces CoCreateInstanceEx, and CoCreateInstaceFromApp will reject any CLSID not excplicitly supported by Microsoft. From
http://msdn.microsoft.com/en-us/library ... s.85).aspx
"Only built-in classes that are supported in the app container are supplied. Attempts to activate unsupported classes, including all classes installed by 3rd-party code as well as many Windows classes, result in error code REGDB_E_CLASSNOTREG."
Post Reply