I've published the updated version of the "PowerPoint"
remote control
that I wrote for SmartPhone.
Morgan contributed a whole bunch
of code to this - in particular, what he's done is to make the actions performed
by the desktop listener in response to receiving key presses from the SmartPhone
completely configurable.
So, the SmartPhone sends keypresses over Bluetooth to the desktop listening
app. That app then has a configuration file which allows you to specify a number
of Routers which perform actions based upon the key presses received.
The default one sends the keys on to PowerPoint in SlideShow mode using OLE
automation (as described in the previous post).
Morgan has a second router in there (commented out by default) named the
"ActiveApplicationRouter". This uses functionality from a library
(TInputHlp.dll) that I think he got from an old
John Robbins
article and it uses the
SendKeys format for the commands that the ActiveApplicationRouter will send
to the active application on receipt of control keys from the SmartPhone.
This means that you can easily do away with the default Router that I wrote
(and which is still plugged in by default) and replace it with the
ActiveApplicationRouter because you can make that drive any app - I think
Morgan's particular idea was to get it to drive Windows Media Center 2005 and
I'll have a stab at posting a configuration file which makes Media Center work
from the SmartPhone.
I've uploaded a new version of the installer -
you need to
download this zip file and run through it. Note that you need ActiveSync and
various other bits and pieces to get this to work as "detailed" in the previous
post.
I've also uploaded the complete source code for this -
you can
download it from here. Note that this is quite a number of projects and
there are some batch files in the build process that would need to be "modified"
in order to get it to build for you. I'm happy to take the odd question on this
if people have them. The project structure is something like;
BluetoothAddressing: Simple utility classes for playing with
Bluetooth addresses.
BluetoothDesktopTrayApp: the desktop listening component which
invokes routers in response to SmartPhone command keys.
BluetoothSmartphoneApp: the smartphone application that connects
over Bluetooth to the desktop bits.
PptUtilities: Office interop code that drives PowerPoint.
Routers: The definition of the routing interface and the
implementation of the 2 that we have: ActiveApplicationRouter and
PowerPointKeyPressRouter.
XpBluetooth: Code to provide a managed wrapper around working with
the sockets API from a Bluetooth perspective.
XpBluetoothHighLevel: Higher level wrapper to make the XpBluetooth
assembly easier to work with.
BluetoothRemoteControlSetup: Setup project.
All of this is written in C# with the exception of the XpBluetooth
project where I resorted to managed C++ in order to make the calls to the API's
easier without having to get into StructLayout and all that stuff in the
System.Runtime.InteropServices namespace.
Enjoy! If someone makes this better then feel free to let me know!
Posted
Tue, Dec 7 2004 3:24 PM
by
mtaulty