diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-2068DA42-AE77-5213-B3CF-C3AB7F2188BE.dita --- a/Symbian3/PDK/Source/GUID-2068DA42-AE77-5213-B3CF-C3AB7F2188BE.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-2068DA42-AE77-5213-B3CF-C3AB7F2188BE.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,62 +1,62 @@ - - - - - -Using -a FAT Filename Conversion Plug-inThis section describes how to dynamically load and call a FAT Filename -Conversion plug-in to convert file names between Unicode and Windows code -page. -

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

    -
  • FAT -Filename Conversion Plug-ins Overview introduces Windows code page -and the main purpose of the Plug-ins component.

  • -
- -Load -the FAT Filename Conversion plug-in DLL. -_LIT(KName,"cp1250"); //The name of the plug-in DLL -const TUid KPluginUid={0x10206A9C}; //DLL UID acquired from Symbian -RLibrary lib; - -//Encapsulate the UID of this DLL in TUidType. -const TUidType serverUid(KNullUid,KNullUid,KPluginUid); - -//load the DLL -User::LeaveIfError(lib.Load(KName,serverUid)); -

In this example, cp1250.dll is dynamically loaded. -A function is then called to convert a character from Unicode to CP1250.

-
- -Get the exported function from the DLL. -// Function at ordinal 1 converts text from a Unicode to CP1250. -TLibraryFunction function1 = lib.Lookup(1); - -typedef void (*TConvertFromUnicodeL)(TDes8&, const TDesC16&); -TConvertFromUnicodeL aConvertFromUnicodeL = - reinterpret_cast <TConvertFromUnicodeL> (function1); - - -Call the function to convert the text from Unicode to CP1250. -TBuf8<15> foreign1; -_LIT16(Uni_1, "\x0053\x0059\x004D\x0042\x0049\x0041\x004E\xFFFD\x20AC\x02C7\x2015"); -const TDesC16& unicode1(Uni_1); -(*aConvertFromUnicodeL)(foreign1, unicode1); -... - - -Close the DLL. -lib.Close(); - -
-

The parameter foreign1 is returned with the value "\0x53\0x59\0x4D\0x42\0x49\0x41\0x4E\0x81\0x80\0xA1\0x5F" which is in the CP1250 encoding.

-
-Creating -a FAT Filename Conversion Plug-in + + + + + +Using +a FAT Filename Conversion Plug-inThis section describes how to dynamically load and call a FAT Filename +Conversion plug-in to convert file names between Unicode and Windows code +page. +

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

    +
  • FAT +Filename Conversion Plug-ins Overview introduces Windows code page +and the main purpose of the Plug-ins component.

  • +
+ +Load +the FAT Filename Conversion plug-in DLL. +_LIT(KName,"cp1250"); //The name of the plug-in DLL +const TUid KPluginUid={0x10206A9C}; //DLL UID acquired from Symbian +RLibrary lib; + +//Encapsulate the UID of this DLL in TUidType. +const TUidType serverUid(KNullUid,KNullUid,KPluginUid); + +//load the DLL +User::LeaveIfError(lib.Load(KName,serverUid)); +

In this example, cp1250.dll is dynamically loaded. +A function is then called to convert a character from Unicode to CP1250.

+
+ +Get the exported function from the DLL. +// Function at ordinal 1 converts text from a Unicode to CP1250. +TLibraryFunction function1 = lib.Lookup(1); + +typedef void (*TConvertFromUnicodeL)(TDes8&, const TDesC16&); +TConvertFromUnicodeL aConvertFromUnicodeL = + reinterpret_cast <TConvertFromUnicodeL> (function1); + + +Call the function to convert the text from Unicode to CP1250. +TBuf8<15> foreign1; +_LIT16(Uni_1, "\x0053\x0059\x004D\x0042\x0049\x0041\x004E\xFFFD\x20AC\x02C7\x2015"); +const TDesC16& unicode1(Uni_1); +(*aConvertFromUnicodeL)(foreign1, unicode1); +... + + +Close the DLL. +lib.Close(); + +
+

The parameter foreign1 is returned with the value "\0x53\0x59\0x4D\0x42\0x49\0x41\0x4E\0x81\0x80\0xA1\0x5F" which is in the CP1250 encoding.

+
+Creating +a FAT Filename Conversion Plug-in
\ No newline at end of file