Creating a FAT Filename Conversion Plug-in

This section describes how to create a FAT Filename Conversion plug-in DLL.

This tutorial assumes that you have an understanding of the following:

The flowchart below shows the steps to create a Fat Filename Conversion plug-in DLL.

Note: To create the plug-in DLL, the unicodeconv.cpp file is needed. It provides the functions to convert text between Unicode and a foreign encoding. It is available on the Symbian Foundation web site.

This tutorial uses the example of CP1250 to explain the process of creating a plug-in DLL.

  1. Create a source file using a text editor and save it as, for example d:\charconvfiles\data\cp1250.txt. This file contains pairs of hexadecimal numbers. The first number in each pair is the encoding of a character in CP1250 and the second is the Unicode encoding of the same character.
    ...
    0x00    0x0000    #NULL
    0x01    0x0001    #START OF HEADING
    0x02    0x0002    #START OF TEXT
    0x03    0x0003    #END OF TEXT
    0x04    0x0004    #END OF TRANSMISSION
    0x05    0x0005    #ENQUIRY
    0x06    0x0006    #ACKNOWLEDGE
    ...
    The source file has the same syntax as a cnvtool source file. For more information about the syntax, refer to Cnvtool Source File.

  2. Start a command prompt to run the ConversionTable tool on the source as follows:

    cd d:\Symbian\epoc32\tools

    ConversionTable.pl d:\charconvfiles\data\cp1250.txt

    This process generates a C++ source code file called cp1250.cpp. It is referred to as the ConversionTableTool-generated cpp file, which contains the data structure. The data structure is used by unicodeconv.cpp for the encoding conversion.

  3. Create an mmp file which is used to build the plug-in DLL.
    TARGET            cp1250.dll
    CAPABILITY            All
    TARGETTYPE            dll
    
    UID        0x100039e6 0x10206A9C
    VENDORID     0x70000001
    
    OS_LAYER_SYSTEMINCLUDE
    USERINCLUDE            ../inc
    
    SOURCEPATH            ../src
    SOURCE            unicodeconv.cpp
    
    SOURCEPATH            +/build/generated/fatcharsetconv
    SOURCE            cp1250.cpp
    
    DEFFILE             fatCnv.def
    
    LIBRARY            euser.lib
    
    SMPSAFE

Build the plug-in DLL and install it into the \sys\bin\ directory. The DLL is then available to be loaded and called by the File Server.