Compiling and running Blake.NUI on a Surface Table running Vista

Mar 1, 2011 at 2:13 PM
Edited Mar 1, 2011 at 2:14 PM

Hallo,

I'm new to Blake.NUI which I want to try out after reaching the technical limits of the Surface SDK 1.0 ... (see stackoverflow)

I installed the Surface Toolkit Beta, the Surface SDK 1.0, Blend 4 SDK, etc. on my Windows 7 laptop and Blake.NUI worked fine.

On the Surface Table, which is running Vista, I'm not able to install the Surface Toolkit and I have problems running the Blake.NUI.TestApplication.Surface. I get the runtime error "Unable to find an entry point named 'RegisterTouchWindows' in DLL 'user32' in the TouchHander.cs -> SetHWndTouchInfo() method, which perhaps is thrown because Vista is missing the touch functionalities of Windows 7...

Do I have to install Windows 7 on my Surface Table to get Blake.NUI working? If it is so, does anyone know the default BIOS password, so I can configure the table to boot from an USB stick?

Regards,

HeBu.

Coordinator
Mar 1, 2011 at 3:41 PM

HeBu,

Do not attempt to install Windows 7 on your Surface v1. It would cease to be a Surface and just become a big-ass Windows 7 box. You also do not need to install SurfaceToolkit on Surface. I have the Blake.NUI.WPF.Surface and Blake.NUi.WPF.SurfaceToolkit projects separate for this scenario.

In the TestApplication.Surface I have an extra call that has a Win7 dependency but you can safely comment it out on Surface. In MainWindow.xaml.cs, comment out this line in the constructor:

NativeTouchDevice.RegisterEvents(this);
Mar 1, 2011 at 9:26 PM

Hallo joshb,

thanks for your help, that really helped me understand how the different input devices work. But as I think, my main goal cannot be reached with only Blake.NUI, the Surface SDK and Vista. I need to emulate contact events (cf. SendInput() for mouse events). I think this only can be done sending out WM_TOUCH messages in a Windows 7 environment. If there is a way to emulate contact events with only Vista, Blake.NUI and Surface SDK (and without using the SimulatorAutomation), please let me know.

Regards,

HeBu.

Coordinator
Mar 2, 2011 at 3:47 PM

If you're trying to control Windows 7, then you would probably need to send WM_TOUCH messages, but that requires getting your hands really dirty and writing a device driver. You could look at MultiTouchVista for an example perhaps.

If this is all within a single Surface application, then you just need to use WPF 4 and Blake.NUI and modify a copy of SurfaceTouchDevice so you can tell it what events to send to which positions.

Mar 4, 2011 at 8:17 PM
Edited Mar 4, 2011 at 9:14 PM

Ok, I understand that sending out WM_TOUCH events is a very difficult task to do...

Sending out contact events can't be done either, as the class members of the Contact class are read-only and can't be modified.

I'll try a little work-around, register the Blake.NUI's MouseTouchDevice and use SendInput() to send out mouse events. Maybe this will do for the beginning...

Edit: If I use SendInput() I can only simulate one contact at a time, because there's only one mouse cursor.... I should try to write my own InputProvider for MultiTouchVista.