Bluetooth Remote Control 0.8.1

By Jerome at July 23, 2007 01:00 Tags:

Yet an other release of Bluetooth Remote Control for Windows Mobile, 0.8.1.

This time, it did not take me long to add control from the mobile device of the desktop mouse. To use it, just point on the device screen, and it will move the mouse pointer... Tap, and it will left click. Double Tap, it will left double click :) It works kinda great on my HTC Touch ;)

There's no actual interface for that, but it will work with any active application, for now at least. The acceleration is not configurable, but it will in the next release.

I'll also add support for non touch screen mobile devices.

Have fun !

"No files were found to look in. Find was stopped in progress." in VS2005

By Jerome at June 19, 2007 07:08 Tags: ,

There are bugs, mystical bugs I may add, that no one has been able to reproduce, nor find a fix for, well at least that do work on every occurrence. VS2005 has one of these, where when you try to use "find in files", you get a "No files were found to look in. Find was stopped in progress." and that's it. No disk access, no registry relevant access, no relevant file access.

Some have found that pressing Ctrl+Scroll Lock may help, well, it did not help for me. Some other tried the reboot, which seems to work better. You can also
spin around three times on your chair before doing that, that might also help.

Then I remembered that some times, because it seems that the CLR maintains some kind of "cross process state" (I don't know what it acutally is, so I'm just guessing) that cripples all the .NET processes that are running. The only way to reset that state is to kill all processes that are using the CLR.

That means killing every standard application, plus IIS's aspnet_wp, and if you have .NET 3.0, PresentationFontCache.exe, ...

That did the trick for me, after killing all these processes and running VS2005, my search was up and running :)

Bluetooth Remote Control Forum

By Jerome at June 10, 2007 15:32 Tags:

It's been a request for some time, and to allow some users to ask questions to other users, I've installed a simple forum :

Feel free to post any questions, or wishes. I'll answer there.

Bluetooth Remote Control 0.8.0-Beta1

By Jerome at June 09, 2007 15:30 Tags:

There it is : Bluetooth Remote Control for Windows Mobile, 0.8.0-Beta1

A lot of updates for this release, like support for iTunes, or support for external events like phone ringing, or taking a call and binding it to an application command. Now the last used application is remembered, and it is possible to disable an application, to have only applications that are actually used.

There's still no documentation for all that, but I'm sensing that the application has reached a "critical mass" that starts to need a documentation to avoid letting some features in the dark.

Anyway, on the menu, you'll find :

  1. Added support for phone event binding to application commands, such as Ringing and Take Call or Hang Up. (Windows Mobile 5+ only)
  2. Added the ability to disable an application, rendering it invisible from the mobile device, see the key bindings section.
  3. Added support for iTunes.
  4. Added last application remembered upon launch.
  5. Fixed sound mixer support for Windows Vista.
  6. Added sound volume binding in Media Player Classic.
  7. Fixed device search on mobile side not ending when bluetooth stack is not supported.
  8. Fixed Media Center icon.
  9. Fixed Media Center name not fitting on smartphone screen.
  10. Added support for Windows Mobile 2003 for PPC.

Have fun :) And of course, if you find bugs -- and I'm sure someone will -- please drop me a mail or a comment !

Bluetooth Remote Control and Incoming Calls

By Jerome at June 03, 2007 14:34 Tags:

There's one feature that's been a long lasting request, and did not have the time to technically look into : The ability to execute any command when the phone is ringing.

I had a few time lately to work on this and now, Bluetooth Remote Control now has the ability to run a command when a phone event is raised. I'm currently adding "Phone Ringing" and "Call in Progress". But I'll probably be adding some more, like incoming SMS and stuff like that.

This is going to be interesting for people wanting their music to pause during their conversation, and unpause when they hang up.

This release should be available shortly.

Vista's Sound Mixer in Bluetooth Remote Control

By Jerome at May 26, 2007 12:04 Tags: ,

If you're using Vista, you might have noticed that you can't change the volume using the "Windows Mixer" remote control section.

Actually, the volume do change, but for the application itself. BTRC is not generating any sound, this is particularly not useful. Vista's got a new feature that allows the user to control the volume of applications independently, which is pretty cool from the user point of view.

But from the developer's perspective, this modifies a bit the way for setting the sound volume. The "old" api still works but for the current application; and if you set the application in Windows XP compatibility mode, the behavior will be restored. Since I don't want to set that compatibility mode, I had to add specific support for vista using the new IAudioEndpointVolume, COM interface (COM, when'll that disapear...) that allows getting back the original behavior, which is changing the master volume.

It'll be in the next release.

WCF, NuSOAP and ArrayOfString

By Jerome at April 16, 2007 15:21 Tags: , , , ,

When exposing a WebService via WCF, you might want to expose something like this :

public class SomeContract
  public string[] Values { get; set; }

For that particular data contract, WCF will be generating a WSDL with something like this :

<xs:complexType name="SomeContract">


    <xs:element minOccurs="0" name="Values" nillable="true"


                xmlns:q1="" />



With ArrayOfString being defined like this :

  <xs:schema elementFormDefault="qualified"




    <xs:complexType name="ArrayOfstring">


        <xs:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="xs:string"/>



    <xs:element name="ArrayOfstring" nillable="true" type="tns:ArrayOfstring"/>


In general, that would be fine. The type "ArrayOfString" is defined in a different namespace, but this should not be a problem.

So, to use that particular type in a method call, you should have a document like this one :


  <Values xmlns:a="">

    <a:string>My Value</a:string>



"string" elements are contained in a different namespace from the SomeContract element. However, the NuSOAP stock version 0.7.2 has a problem with that kind of schema, and generates instead something like this :



    <string>My Value</string>



When the WCF deserializer receives a document like this one, it does not find the "Values" member in the namespace he's looking and ends up creating a SomeContract instance with a null array of strings.

Since there's no way of fixing NuSOAP, you may need to tweak your contract to help NuSOAP serializing your data without a namespace.

The CollectionDataContract attribute seems to be the way to go, since there is a way to specify the namespace to use when generating the metadata. The service contract then looks like this :

  [DataContract(Namespace = "")] 
  public class SomeContract 
    public ArrayOfString InvalidIdentifiers { get; set; } 

  [CollectionDataContract(ItemName="string", Namespace="")]
  public class ArrayOfString : List<string> { } 

Thereby placing everything in the "" namespace.

You might need to tweak a bit the ArrayOfString class, especially if you need to assign it from an actual string[] instance, but you get the idea.

WCF WebService behind a NAT Gateway

By Jerome at April 15, 2007 11:06 Tags: , , ,

I'm currently working on a WCF service that's exposed via a basicHttpBinding, with some exposition of the metadata via a WSDL url.

The metadata generator has been improved a bit since it is now split into multiple files, with references from the first wsdl to other URI's. There's not much to do to have that WSDL generated, and the generator take the liberty of using the machine's name to create reference URIs.

Most of the time, this is a good idea, but sometimes when your machine is behind a NAT gateway doing some port forwarding, your machine probably won't have the public FQDN used to access your gateway. You then end up with a root document referencing URI's with a host name that is not valid on the other side of the gateway.

The solution to change that behavior is quite simple : Just change the host name IIS is listening on. Use the MMC snap-in, and specify that your port 80 (or whatever port you're using) is listening on your external FQDN. WCF will then use that host name when generating URI's. Also don't forget that if you specify a host name, you might need to add an other entry to be able to access your website using "localhost".

This operation is also needed for servers farm when doing some load balancing.

Unprotecting Protected Processes

By Jerome at April 07, 2007 15:09 Tags: ,

Alex Ionescu's been searching a bit about Protected Processes, and he's managed to get around that protected state.

I'm no expert on that part nor have I read enough documentation on how that works, but since a goal of that particular feature is the "Protected Media Path" (PMP) to prevent anyone from eavesdropping a protected media, this is not good.

Since that implementation is based on a driver, that won't work on Vista 64, well, as long as you don't boot in that particular mode that allows you to load unsigned drivers. That's a good news for malware protection, since a virus shoud not be able to hide itself under normal conditions, but this is not for PMP. It seems that protected processes can check for a "tainted" environment, but how long is it going to take for someone to fool programs into thinking the system is clean... ? As always, that won't prevent evil dvd rippers to copy the media... but that'll piss a legitimate user.

Moreover, since it is easily possible in Vista 32, as alex is pointing it out, it probably won't take long for viruses to hide themselves using this technique and just a bit longer for antiviruses to unprotected any running process.

What a mess :)

Vista's Support for External Displays

By Jerome at April 07, 2007 10:14 Tags:

Among the many hidden new features of vista which belong to the category of "why didn't they do this in the first place", there is the new and improved support for displays and external displays in particular for a laptop.

In Windows XP, when you were attaching a display to your laptop, the resolution (and color depth) used was attached to the physical port, not to the display itself. So if you were moving around a lot with your laptop attaching many displays with many different resolutions, you had to reconfigure each time.

Vista's way is a bit different since the resolution and color depth are now attached to each specific display, and are automatically recalled upon connecting the cable. Now, when you attach a display, you can hear the "device connected" sound, the same used when connecting an USB device or PCMCIA card.

This also goes along with the presentation mode which allows to hide your trolling background when hosting a presentation. This is particularly useful at Epitech :)

About me

My name is Jerome Laban, I am a Software Architect, C# MVP and .NET enthustiast from Montréal, QC. You will find my blog on this site, where I'm adding my thoughts on current events, or the things I'm working on, such as the Remote Control for Windows Phone.