Windows CE 5.0, doing the long filename thing.

Long filename support has been around in Microsoft dekstop operating systems for some time, in fact, when you boot Windows CE using the standard "Explorer Shell" you will see shortcuts on the desktop to "Internet Explorer" and "Recycle Bin", both of these are considered to be long filenames, why? becasue the files don't fit into the 8.3 format used by MS-DOS, and the filenames contain spaces (how many of you remember having to care about 8.3 filename format?).

So, how do you build an operating system image that contains a long filename file? - actually, the process turns out to be fairly simple.

Let's assume that you have a file called "Autumn Image.jpg", and you want to include this into your operating system image, you could start with the tutorial that shows how to add files to your operating system image, unfortunately, CEFileWiz doesn't currently (and I'm going to work on this) deal with filenames that include spaces, so here's how to fix this by hand.

Once CEFileWiz has created your project (let's call the project Autumn_Image) you will have a number of support files for your project, this will include a file called Autumn_Image.bib, here's how the file looks by default.

;
; Copyright (c) 2005 Microsoft Corporation. All rights reserved.
;
;
; NOTE: if any of the .EXE's included in this component are .NETCF
; you will need to move them to the FILES section.
;
MODULES
; Name Path Memory Type
; -------------- ---------------------------------------- -----------

FILES
; Name Path Memory Type
; -------------- ---------------------------------------- -----------
Autumn Image.jpg $(_FLATRELEASEDIR)\Autumn Image.jpg NK

Building the operating system with this BIB file will cause build errors, the build system will parse the BIB entry using the spaces in the filename as a delimiter between the BIB entries, so the quick and easy fix is to add a set of quotes around the filenames, like so...

;
; Copyright (c) 2005 Microsoft Corporation. All rights reserved.
;
;
; NOTE: if any of the .EXE's included in this component are .NETCF
; you will need to move them to the FILES section.
;
MODULES
; Name Path Memory Type
; -------------- ---------------------------------------- -----------

FILES
; Name Path Memory Type
; -------------- ---------------------------------------- -----------
"Autumn Image.jpg" "$(_FLATRELEASEDIR)\Autumn Image.jpg" NK

It's a quick and easy fix to get filenames that include spaces included into your operating system image - look for a CEFileWiz update coming soon - I bet there's also a problem dealing with spaces in the .DAT files, that's something else for me to take a look at.

- Mike