Snow in Montréal, QC

By Jerome at December 04, 2007 20:16 Tags: ,

Well, how original is that. Snow in Montréal. The last time there was that much snow in here at this time of the year was many years ago, and this time 40 centimeters fell from the sky in 24 hours. For what I can see here and there, some are happy about that, some a bit less. Schools are closed, traffic quite a bit jammed and offices part empty.

PublicLight in a Snow Storm
A Whole lot of Snow

Anyway, as long as you're on foot and have waterproof winter boots, that's good... and for now that suits me. I just wish I won't be needing a car in a too near future ! Is that really a car under this ?! :)

I just had to slide down to the street. The ambience outside was particularly interesting, and that was a pretty good moment to take some shots !

Snowy Stairs

News from Montréal

By Jerome at October 19, 2007 07:14 Tags:

There I am ! I'm now in Montréal, enjoying my strike-free environment ! Weather's still good with a pleasant temperature, at the end of the "été des indiens".

After visiting a bunch of canadian administrations, I'm now enjoying some peaceful time with my wife, visiting some places and friends we've seen the last time we went there. People here are so much cooler than in Paris... No one rushing even at peak hours in the subway, people waiting in line to take the bus... I like that ! I'm told that compared to Québec city, Montreal life is stressing. I wonder how's life in Québec ! Point of view and stuff... 

Relocating is not an easy thing to do, with so many things to think at once, like selling stuff, terminating contracts and stuff. Well, this is done now :) If you ever need to ship some personal effects from france, I can tell you that "Bagages du Monde" is doing great.

My new job at Averna is starting in a few days, I'll be telling you a bit more by then ! (as well as show some pictures !)

Bluetooth Remote Control 0.8.3 - Broadcom Bluetooth Support for Windows Mobile

By Jerome at September 10, 2007 11:26 Tags:

This time, I've added the support for the Broadcom (formerly Widcomm) stack on the Windows Mobile side.

This should add support for the Motorola Q9, which uses this particular stack.

On the stability and compatibility side, I've only tested on a version of the widcomm stack for the HTC Wizard, but only on WM6 and I don't know if it actually works on other devices :)

If it works for you, please let me know !

Download Bluetooth Remote Control 0.8.3 now !

If you ever want to install the Broadcom stack on WM6 for the HTC Wizard and you get a "Not enough driver memory", try changing the "StackMode" value from "0" to "1" in HKLM/Widcomm/BTConfig/General. It worked out for me :)

Broadcom/Widcomm Bluetooth Stack and SetSecurityLevel

By Jerome at September 05, 2007 15:37 Tags: ,

C++, my almost favorite language. This language had good intentions, really. But this is such a pain -- a  pit of despair -- to have to deal with library compatibility and compilation parameters matching issues, where it should be handled by the system.

Anyway, if you're trying to use the Broadcom Bluetooth SDK for Windows CE with VS2005 or VS2008, you might encounter this pretty message :

error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl CRfCommIf::SetSecurityLevel(wchar_t *,unsigned char,int)" (__imp_?SetSecurityLevel@CRfCommIf@@QAAHPA_WEH@Z)

The symbol actually exists in the broadcom provided library (BtSdkCE30.lib or BtSdkCE30.lib)  but is defined like this :


which, undecorated, means :

int CRfCommIf::SetSecurityLevel(unsigned short *,unsigned char,int)

See the difference ? The wchar_t type the compiler is using should be an unsigned short. Basically, both types are binary equivalents but the compiler is treating them as different, hence the different signature.

To fix this, just set the option "Treat wchar_t as Built-in Type" to No.

This way, the wchar_t will go back to being a short, and then match the method built in the static library.

I'm going back to my C# code, now.

Canada !

By Jerome at August 31, 2007 11:52 Tags:

Well, that was as not easy as it would have seemed, but it's done ! I'm moving to Canada !

I'll be in Montréal by the end of the year, still working with .NET technologies, but with the canadian spirit that I think I'll enjoy to learn and live with !

There's a lot of french people over there, like SharkOne (maybe still there at that time ?), or Sanx, and some other Epitech students I've graded a few years ago... This'll be great !

And no worries about Bluetooth Remote Control, I'll continue working on it :)

Binding a C# property to a WPF validated Control

By Jerome at August 29, 2007 05:48 Tags: , ,

The DataBinding in WPF allows the binding of control properties to many things, like other control properties, arrays, data providers, ... But it can also bind a control property to a property defined by code on the C# side.

It is interesting to bind to C# property to be able to have the integrated WPF validation and still use a simple property from the code. In that case, I wanted to have the validation of a TextBox displaying a DateTime object.

Here's how to do this.

On the C# side :

public partial class Window1 : Window

  public Window1() 
    MyDate = DateTime.Now;
  public DateTime MyDate { get; set; }

Note that I'm using the latest C# 3.0 syntax to declare variable-less properties. This is compiler trick, the variable is still declared at compile time, but since I don't need to have a specific code in the get or set accessor, it can stay in this short form.

Now on the XAML side :

<Window ... >

  <TextBox Width="100" Height="20">

    <Binding Path="MyDate" RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}" UpdateSourceTrigger="PropertyChanged">


        <ExceptionValidationRule />





The interesting part here is the use of RelativeSource and the FindAncestor mode. Here, we're looking for the property MyDate from the nearest ancestor instance of the Window type, from the current instance.

This way, you'll have a validated date time in your property value. Just make sure you're checking that the value is really valid using the System.Windows.Controls.Validation class.

0.8.2 Re-Release

By Jerome at August 25, 2007 03:05 Tags:

It seems that I forgot to update some scripts in my build process, and that the cab files were not updated in the last release.

So, I you downloaded version 0.8.2 and that the version of the software on your mobile device is not (See options / About...), then you should download it again to run the latest.

These things happen sometimes :)

Bluetooth Remote Control 0.8.2

By Jerome at August 22, 2007 15:44 Tags:

This kind of a fix only release. I'm trying to fix the "MissingMethodException". This is a bit weird since the function I'm calling should always be here, as said in the SDK documentation... Some documentation or ISV glich, maybe.

I've also added a more visual bluetooth availability check. Now, if the background of the desktop server is in some kind of red color, then bluetooth is not available. Of course, nothing won't work until it becomes gray again.

On a side note, I'm trying some of the new features of Visual Studio 2008, like the multi-targeting of frameworks. Too bad they did not include the .NET Compact Framework 1.0. This is not good news for Bluetooth Remote Control, since I'm keeping .NET CF 1.0 to run on older devices like Smartphones with WM2003. I guess I'm going to have to drop support of these devices in future version.

Get the new release here :


By Jerome at August 15, 2007 15:47 Tags:

I'm getting more and more interested in digital photography... That's why I'm now going to post more and more of my pictures on flicker.

Things I like about that is that I can use my existing knowledge for the digital part :) About the artistic part, well... I'm learning. Depth of field, aperture size, exposition time, white balance and stuff like that... many things to configure before taking a picture :) But I like it !

You can see them by clicking on the flicker badge on the right side of this page.

Google, Sitemaps, Multi-Culture, and ASP.NET

By Jerome at July 26, 2007 13:48 Tags:

A while ago, by watching my web server logs and some statistics on Google Analytics, I discovered that writing content in english and having a server based in the US has the effect of my site being mostly visible from within the US. It is also a bit visible when using localized google sites, but the page rank is quite low... So I'm tried to improve my page rank.

Google Webmaster Tools is an interesting tool shows rather precisely how Google scans a website. It can alert if it encounters server errors (500), broken links (404) or any other unusual error for links that point to a website. That tool helped me fixing an URL rewriting bug a while ago.

There's also a section called Sitemap, which allows you to provide explicitly a list of urls from your site. This is more of a hint than an order, but that helps to have the content being indexed a bit more quickly.

To have my content displayed in multiple languages, namely English, French and Spanish, I tried multiple techniques, one being the use of the automatic culture selection of ASP.NET. This is fine when a "real" user is browsing a site, but for the indexing this is not effective. The automatic culture is based on the accept-language HTTP header, which is not set by the google crawler... Google then only indexes the default language, which is English for me.

Then I tried the HTTP query parameters, by adding a &lang=fr-FR at the end of each page. Well, that not good enough either, since it seems that Google is not indexing dynamic content pretty well.

Finally, I tried adding the culture just before the aspx extension (, which "fools" google into thinking this is static content. This is an extension of the url rewriting technique I use to have my urls containing the titles of my blog posts.

This time it worked! I have my remote control page listed in the first page of Google France and Spain with "Bluetooth Remote Control" query. Also, to make sure that I have links to each and every language available without explicitly placing them in the sitemap, I also placed "language" flag image links at the top of each page. This is not useful for real users, since culture will probably be selected correctly in the first place, but it'll help indexing.

I also noted that having Hn HTML tags improves indexing. Search engine rank optimization is a strange and obscure science... :)

PS. : Sorry for the bad spanish language, it's a raw Google translator cut and paste. I'm in the process of having the text checked by a spanish speaker :)

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.