StandaloneRes.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:35k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*****************************************************************************
  36.  *
  37.  * Filename:
  38.  * ---------
  39.  *   StandaloneRes.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   Maui_Software
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *   This file implements standalone resource related functions
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * removed!
  58.  *
  59.  * removed!
  60.  * removed!
  61.  * removed!
  62.  *
  63.  * removed!
  64.  * removed!
  65.  * removed!
  66.  *
  67.  * removed!
  68.  * removed!
  69.  * removed!
  70.  *
  71.  * removed!
  72.  * removed!
  73.  * removed!
  74.  *
  75.  * removed!
  76.  * removed!
  77.  * removed!
  78.  *
  79.  * removed!
  80.  * removed!
  81.  * removed!
  82.  *
  83.  * removed!
  84.  * removed!
  85.  * removed!
  86.  *
  87.  * removed!
  88.  * removed!
  89.  * removed!
  90.  *
  91.  * removed!
  92.  * removed!
  93.  * removed!
  94.  *
  95.  * removed!
  96.  * removed!
  97.  * removed!
  98.  *
  99.  * removed!
  100.  * removed!
  101.  * removed!
  102.  * removed!
  103.  * removed!
  104.  * removed!
  105.  *
  106.  * removed!
  107.  * removed!
  108.  * removed!
  109.  *
  110.  * removed!
  111.  * removed!
  112.  * removed!
  113.  *
  114.  *------------------------------------------------------------------------------
  115.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  116.  *============================================================================
  117.  *******************************************************************************/
  118. #include "MMI_features.h"
  119. #include "string.h"
  120. #include "PixtelDataTypes.h"
  121. #include "CustDataRes.h"
  122. #include "CustMenuRes.h"
  123. #include "gui_themes.h"
  124. #include "FontDcl.h"
  125. #include "wgui.h"
  126. #include "DownloadProtos.h"
  127. #include "pwic.h"
  128. #include "IMERes.h"
  129. #ifdef MMI_ON_HARDWARE_P
  130. #include "custom_jump_tbl.h"
  131. #include "verno.h"
  132. #ifdef __J2ME__
  133. #include "j2me_custom.h"
  134. #endif 
  135. #if (!defined(__L1_STANDALONE__) && !defined(EMPTY_MMI))
  136. extern void MMIResourceMismatchWarning(
  137.                 kal_int8 errType,
  138.                 kal_int8 errResType,
  139.                 kal_uint8 const *codeversion,
  140.                 kal_uint8 const *resversion);
  141. #endif /* (!defined(__L1_STANDALONE__) && !defined(EMPTY_MMI)) */ 
  142. #include "resource_audio.h"
  143. #include "nvram_user_defs.h"
  144. #include "resource_custpack_jtbl.h"
  145. #if defined(OBIGO_SUPPORT) && defined(WAP_SUPPORT)
  146. #include "custom_wap_config.h"
  147. #endif 
  148. /* IMAGE variables */
  149. extern void *image2ndJumpTbl[];
  150. extern Type_Preamble_Content ImageResPreamble;
  151. CUSTOM_IMAGE *nCustImageNames = NULL;
  152. U16 CurrMaxImageNum = 0;
  153. S32 n_MMI_themes = 0;
  154. char *mmi_theme_phone_model;
  155. #ifdef __MMI_THEMES_V2_SUPPORT__
  156. theme_details_struct *MMI_themes;
  157. #else 
  158. MMI_theme **MMI_themes = NULL;
  159. #endif 
  160. /* 101205 audio resource Calvin Start */
  161. /* AUTOGEN AUDIO variables */
  162. extern void *autogenaudio2ndJumpTbl[];
  163. extern Type_Preamble_Content AutogenAudioResPreamble;
  164. CUSTOM_AUDIO *nCustAudioNames = NULL;
  165. U16 CurrMaxAudioNum = 0;
  166. /* 101205 audio resource Calvin End */
  167. /* Audio variables */
  168. extern const device_tones_struct *mtk_resource_tones[];
  169. extern const audio_resource_struct mtk_resource_midis[];
  170. extern const audio_resource_struct mtk_resource_sounds[];
  171. extern const audio_resource_struct mtk_resource_ems_sounds[];
  172. extern const audio_resource_struct mtk_resource_imelodys[];
  173. extern const audio_resource_struct mtk_resource_ems_imelodys[];
  174. extern const audio_resource_struct mtk_resource_message_sounds[];
  175. extern const audio_resource_struct mtk_resource_mms_sounds[];
  176. #ifdef DIGIT_TONE_SUPPORT
  177. extern const audio_resource_struct mtk_resource_human_voice_tones[];
  178. #endif 
  179. #ifdef SIMPLE_TTS
  180. extern const audio_resource_struct mtk_resource_tts_sounds[];
  181. extern const start_end_t mtk_TTS_UCS2_MSB_index[];
  182. extern const unsigned char mtk_TTS_UCS2_LSB[];
  183. extern const unsigned short mtk_TTS_index_table[];
  184. #endif /* SIMPLE_TTS */ 
  185. #ifdef CUST_KEYPAD_TONE_SUPPORT
  186. extern const audio_resource_struct mtk_resource_keypad_tones[];
  187. #endif 
  188. extern Type_Preamble_Content AudioResPreamble;
  189. #ifdef DIGIT_TONE_SUPPORT
  190. audio_resource_struct *resource_human_voice_tones = NULL;
  191. #endif 
  192. #ifdef SIMPLE_TTS
  193. audio_resource_struct *resource_tts_sounds = NULL;
  194. start_end_t *TTS_UCS2_MSB_index = NULL;
  195. unsigned char *TTS_UCS2_LSB = NULL;
  196. unsigned short *TTS_index_table = NULL;
  197. #endif /* SIMPLE_TTS */ 
  198. #ifdef CUST_KEYPAD_TONE_SUPPORT
  199. audio_resource_struct *resource_keypad_tones = NULL;
  200. #endif 
  201. /* Str variables */
  202. extern void *langpack2ndJumpTbl[];
  203. extern Type_Preamble_Content LangPackResPreamble;
  204. //071706 menu resource
  205. CUSTOM_MENU *nCustMenus = NULL;
  206. sLanguageDetails *gLanguageArray = NULL;
  207. U16 gMaxDeployedLangs = 0;
  208. StringResList *gStringList = NULL;
  209. #if defined(__MMI_T9__)
  210. #if defined(__MMI_T9_V7__)
  211. const sIMEModuleDetails gIMEModule = T9V7;
  212. #else 
  213. const sIMEModuleDetails gIMEModule = T9V6;
  214. #endif 
  215. #elif defined(__MMI_ZI__)
  216. const sIMEModuleDetails gIMEModule = ZiV6;
  217. #else 
  218. const sIMEModuleDetails gIMEModule = IME_OTHERS;
  219. #endif 
  220. const sIMEModeDetails *gIMEModeArray = NULL;
  221. const sIMEModeDetails *gIMEQSearchModeArray = NULL;
  222. const sIMELDBDetails *gIMELDBArray = NULL;
  223. #if defined(__MMI_T9__)
  224. #if defined(__MMI_T9_V7__)
  225. T9ChineseData T9FARDATA gT9TRChineseLDB;
  226. T9ChineseData T9FARDATA gT9SMChineseLDB;
  227. #else /* defined(__MMI_T9_V7__) */ 
  228. T9ChineseData FARDATA gT9TRChineseLDB;
  229. T9ChineseData FARDATA gT9SMChineseLDB;
  230. #endif /* defined(__MMI_T9_V7__) */ 
  231. #endif /* defined(__MMI_T9__) */ 
  232. /* J2ME variables */
  233. #ifdef __J2ME__
  234. extern void *J2ME2ndJumpTbl[];
  235. extern Type_Preamble_Content J2MEResPreamble;
  236. #endif /* __J2ME__ */ 
  237. custpack_nvram_header *custpack_nvram_header_ptr;
  238. extern void *custpack2ndJumpTbl[];
  239. extern Type_Preamble_Content CustPackResPreamble;
  240. /* CustPack image variables */
  241. CUSTOM_IMAGE *nCustImageNamesEXT = NULL;
  242. U16 CurrMaxImageNumEXT = 0;
  243. CUSTPACK_IMAGE_HEADER *pimage_header = NULL;
  244. /* 101205 audio resource Calvin Start */
  245. /* CustPack image variables */
  246. CUSTOM_AUDIO *nCustAudioNamesEXT = NULL;
  247. U16 CurrMaxAudioNumEXT = 0;
  248. CUSTPACK_AUDIO_HEADER *paudio_header = NULL;
  249. /*****************************************************************************
  250.  * FUNCTION
  251.  *  StandaloneResValidation
  252.  * DESCRIPTION
  253.  *  
  254.  * PARAMETERS
  255.  *  void
  256.  * RETURNS
  257.  *  void
  258.  *****************************************************************************/
  259. static void StandaloneResValidation(void)
  260. {
  261.     /*----------------------------------------------------------------*/
  262.     /* Local Variables                                                */
  263.     /*----------------------------------------------------------------*/
  264.     JUMP_TABLE_ENTRY_ENUM res_type;
  265.     kal_uint32 res_type_code, res_MAGIC;
  266.     kal_char *project_ID;
  267.     kal_int8 errorType = -1;
  268.     kal_int8 errorResType = 0;
  269.     /*----------------------------------------------------------------*/
  270.     /* Code Body                                                      */
  271.     /*----------------------------------------------------------------*/
  272.     for (res_type = JUMP_TABLE_ENTRY_START; res_type <= JUMP_TABLE_ENTRY_END; res_type++)
  273.     {
  274.         project_ID = (kal_char*) GET_Res_Addr(res_type, 0);
  275.         res_type_code = *(kal_uint32*) GET_Res_Addr(res_type, RESOURCE_TYPE_OFFSET);
  276.         res_MAGIC = *(kal_uint32*) GET_Res_Addr(res_type, MAGIC_NUM_OFFSET);
  277.         /* Check consistency between JUMP TABLE and the RESOURCE BIN */
  278.         if (strncmp(project_ID, (const char*)GET_Res_ProjectID(res_type), strlen(VERNO_STR)))
  279.         {
  280.             errorType = 0;
  281.             errorResType = res_type;
  282.             goto Validation_Exit;
  283.         }
  284.         if (res_MAGIC != GET_Res_Magic(res_type))
  285.         {
  286.             goto Validation_Exit;
  287.         }
  288.         /* ID verification: PROJECT_ID */
  289.         if (strncmp(project_ID, VERNO_STR, strlen(VERNO_STR)))
  290.         {
  291.             errorType = 0;
  292.             errorResType = res_type;
  293.             goto Validation_Exit;
  294.         }
  295.         /* ID verification: RESOURCE TYPE */
  296.         if (((res_type_code & RESOURCE_TYPE_MASK) != RESOURCE_TYPE_AUDIO) &&
  297.             ((res_type_code & RESOURCE_TYPE_MASK) != RESOURCE_TYPE_IMAGE) &&
  298.             ((res_type_code & RESOURCE_TYPE_MASK) != RESOURCE_TYPE_LANG_PACK)
  299.     #ifdef __J2ME__
  300.             && ((res_type_code & RESOURCE_TYPE_MASK) != RESOURCE_TYPE_J2ME)
  301.     #endif 
  302.             && ((res_type_code & RESOURCE_TYPE_MASK) != RESOURCE_TYPE_CUSTPACK))
  303.             goto Validation_Exit;
  304.         /* MAGIC# verification */
  305.         if (res_MAGIC != MAGIC_NUMBER)
  306.         {
  307.             goto Validation_Exit;
  308.         }
  309.     }
  310.     return;
  311.   Validation_Exit:
  312.     {
  313.         kal_uint8 dspl_text[PROJECTID_LEN];
  314.         DRV_POWERON();
  315.         if (strlen(VERNO_STR) < PROJECTID_LEN)
  316.         {
  317.             kal_mem_set(dspl_text, '', PROJECTID_LEN);
  318.             strncpy((char*)dspl_text, (const char*)project_ID, sizeof(VERNO_STR));
  319.             dspl_text[sizeof(VERNO_STR)] = '';
  320.             MMIResourceMismatchWarning(
  321.                 errorType,
  322.                 errorResType,
  323.                 (kal_uint8 const*)VERNO_STR,
  324.                 (kal_uint8 const*)dspl_text);
  325.         }
  326.         else    /* VERNO string too long (> 32 characters) */
  327.         {
  328.             ASSERT(KAL_FALSE);
  329.         }
  330.         while (1);
  331.     }
  332. }
  333. /*****************************************************************************
  334.  * FUNCTION
  335.  *  InitializeResourceVariables
  336.  * DESCRIPTION
  337.  *  
  338.  * PARAMETERS
  339.  *  void
  340.  * RETURNS
  341.  *  void
  342.  *****************************************************************************/
  343. void InitializeResourceVariables(void)
  344. {
  345.     /*----------------------------------------------------------------*/
  346.     /* Local Variables                                                */
  347.     /*----------------------------------------------------------------*/
  348.     void **langpack_JTbl = (void **)GET_ResLangPack_Addr(ENTRY_PREAMBLE);
  349.     void **custpack_header = (void **)GET_ResCUSTPACK_Addr(ENTRY_PREAMBLE);     /* __CUSTPACK_MULTIBIN__ */
  350.     /*----------------------------------------------------------------*/
  351.     /* Code Body                                                      */
  352.     /*----------------------------------------------------------------*/
  353.     /* IMAGE Initialization */
  354.     {
  355.         nCustImageNames = (CUSTOM_IMAGE*) (image2ndJumpTbl[0]);
  356.         CurrMaxImageNum = *((unsigned short*)(image2ndJumpTbl[1]));
  357.     #ifdef __MMI_THEMES_V2_SUPPORT__
  358.         MMI_themes = (theme_details_struct*) (image2ndJumpTbl[2]);
  359.     #else 
  360.         MMI_themes = (MMI_theme **) (image2ndJumpTbl[2]);
  361.     #endif 
  362.         n_MMI_themes = *((S32*) (image2ndJumpTbl[3]));
  363.         mmi_theme_phone_model = (char*)(image2ndJumpTbl[4]);
  364.     }
  365.     /* AUDIO Initialization */
  366.     {
  367.         resource_tones = (device_tones_struct **) mtk_resource_tones;
  368.     #ifdef MIDI_IN_CUSTPACK_BIN
  369.         resource_midis =
  370.             (audio_resource_struct*) ((custpack_audio_header*) (custpack_header[CUSTPACK_AUDIO]))->mtk_resource_midis;
  371.     #else /* MIDI_IN_CUSTPACK_BIN */ 
  372.         resource_midis = (audio_resource_struct*) mtk_resource_midis;
  373.     #endif /* MIDI_IN_CUSTPACK_BIN */ 
  374.     #ifdef SND_IN_CUSTPACK_BIN
  375.         resource_sounds =
  376.             (audio_resource_struct*) ((custpack_audio_header*) (custpack_header[CUSTPACK_AUDIO]))->
  377.             mtk_resource_sounds;
  378.     #else /* SND_IN_CUSTPACK_BIN */ 
  379.         resource_sounds = (audio_resource_struct*) mtk_resource_sounds;
  380.     #endif /* SND_IN_CUSTPACK_BIN */ 
  381.     #ifdef EMS_SND_IN_CUSTPACK_BIN
  382.         resource_ems_sounds =
  383.             (audio_resource_struct*) ((custpack_audio_header*) (custpack_header[CUSTPACK_AUDIO]))->
  384.             mtk_resource_ems_sounds;
  385.     #else /* EMS_SND_IN_CUSTPACK_BIN */ 
  386.         resource_ems_sounds = (audio_resource_struct*) mtk_resource_ems_sounds;
  387.     #endif /* EMS_SND_IN_CUSTPACK_BIN */ 
  388.     #ifdef IMY_IN_CUSTPACK_BIN
  389.         resource_imelodys =
  390.             (audio_resource_struct*) ((custpack_audio_header*) (custpack_header[CUSTPACK_AUDIO]))->
  391.             mtk_resource_imelodys;
  392.     #else /* IMY_IN_CUSTPACK_BIN */ 
  393.         resource_imelodys = (audio_resource_struct*) mtk_resource_imelodys;
  394.     #endif /* IMY_IN_CUSTPACK_BIN */ 
  395.     #ifdef EMS_IMY_IN_CUSTPACK_BIN
  396.         resource_ems_imelodys =
  397.             (audio_resource_struct*) ((custpack_audio_header*) (custpack_header[CUSTPACK_AUDIO]))->
  398.             mtk_resource_ems_imelodys;
  399.     #else /* EMS_IMY_IN_CUSTPACK_BIN */ 
  400.         resource_ems_imelodys = (audio_resource_struct*) mtk_resource_ems_imelodys;
  401.     #endif /* EMS_IMY_IN_CUSTPACK_BIN */ 
  402.     #ifdef MSG_SND_IN_CUSTPACK_BIN
  403.         resource_message_sounds =
  404.             (audio_resource_struct*) ((custpack_audio_header*) (custpack_header[CUSTPACK_AUDIO]))->
  405.             mtk_resource_message_sounds;
  406.     #else /* MSG_SND_IN_CUSTPACK_BIN */ 
  407.         resource_message_sounds = (audio_resource_struct*) mtk_resource_message_sounds;
  408.     #endif /* MSG_SND_IN_CUSTPACK_BIN */ 
  409.     #ifdef MMS_SND_IN_CUSTPACK_BIN
  410.         resource_mms_sounds =
  411.             (audio_resource_struct*) ((custpack_audio_header*) (custpack_header[CUSTPACK_AUDIO]))->
  412.             mtk_resource_mms_sounds;
  413.     #else /* MMS_SND_IN_CUSTPACK_BIN */ 
  414.         resource_mms_sounds = (audio_resource_struct*) mtk_resource_mms_sounds;
  415.     #endif /* MMS_SND_IN_CUSTPACK_BIN */ 
  416.     #ifdef DIGIT_TONE_SUPPORT
  417.     #ifdef HUMAN_VOICE_IN_CUSTPACK_BIN
  418.         resource_human_voice_tones =
  419.             (audio_resource_struct*) ((custpack_audio_header*) (custpack_header[CUSTPACK_AUDIO]))->
  420.             mtk_resource_human_voice_tones;
  421.     #else /* HUMAN_VOICE_IN_CUSTPACK_BIN */ 
  422.         resource_human_voice_tones = (audio_resource_struct*) mtk_resource_human_voice_tones;
  423.     #endif /* HUMAN_VOICE_IN_CUSTPACK_BIN */ 
  424.     #endif /* DIGIT_TONE_SUPPORT */ 
  425.     #ifdef SIMPLE_TTS
  426.         resource_tts_sounds = (audio_resource_struct*) mtk_resource_tts_sounds;
  427.         TTS_UCS2_MSB_index = (start_end_t*) mtk_TTS_UCS2_MSB_index;
  428.         TTS_UCS2_LSB = (unsigned char*)mtk_TTS_UCS2_LSB;
  429.         TTS_index_table = (unsigned short*)mtk_TTS_index_table;
  430.     #endif /* SIMPLE_TTS */ 
  431.     #ifdef CUST_KEYPAD_TONE_SUPPORT
  432.     #ifdef CUST_KEYPAD_TONE_IN_CUSTPACK_BIN
  433.         resource_keypad_tones =
  434.             (audio_resource_struct*) ((custpack_audio_header*) (custpack_header[CUSTPACK_AUDIO]))->
  435.             mtk_resource_keypad_tones;
  436.     #else /* CUST_KEYPAD_TONE_IN_CUSTPACK_BIN */ 
  437.         resource_keypad_tones = (audio_resource_struct*) mtk_resource_keypad_tones;
  438.     #endif /* CUST_KEYPAD_TONE_IN_CUSTPACK_BIN */ 
  439.     #endif /* CUST_KEYPAD_TONE_SUPPORT */ 
  440.     }
  441.     /* 101205 audio resource Calvin Start */
  442.     /* AUTOGEN AUDIO Initialization */
  443.     {
  444.         nCustAudioNames = (CUSTOM_AUDIO*) (autogenaudio2ndJumpTbl[0]);
  445.         CurrMaxAudioNum = *((unsigned short*)(autogenaudio2ndJumpTbl[1]));
  446.     }
  447.     /* 101205 audio resource Calvin End */
  448. #ifdef __J2ME__
  449.     /* For backward compatiable old project without j2me feature */
  450.     /* J2ME Initialization */
  451.     {
  452.         j2me_custom_file_info_ptr = (j2me_custom_file_info_struct*) (J2ME2ndJumpTbl[GAMETYPE_JAVA_GAME]);
  453.         if (j2me_custom_file_info_ptr)
  454.         {
  455.             game_j2me_default_game_count = j2me_custom_file_info_ptr->default_mids_count;
  456.             game_virtual_file_count = j2me_custom_file_info_ptr->virtual_file_info.virtual_file_count;
  457.         }
  458. #ifdef __SUPPORT_INFUSIO__
  459.         eureka_custom_file_info_ptr = (j2me_custom_file_info_struct*) (J2ME2ndJumpTbl[GAMETYPE_INFUSIO_EUREKA]);
  460.         if (eureka_custom_file_info_ptr)
  461.         {
  462.             eureka_default_game_count = eureka_custom_file_info_ptr->default_mids_count;
  463.             eureka_virtual_file_count = eureka_custom_file_info_ptr->virtual_file_info.virtual_file_count;
  464.         }
  465. #endif /* __SUPPORT_INFUSIO__ */
  466. #ifdef SUPPORT_SURFKITCHEN
  467.         surfkitchen_custom_file_info_ptr = (j2me_custom_file_info_struct*) (J2ME2ndJumpTbl[GAMETYPE_SURFKITCHEN]);
  468.         if (surfkitchen_custom_file_info_ptr)
  469.         {
  470.             surfkitchen_default_game_count = surfkitchen_custom_file_info_ptr->default_mids_count;
  471.             surfkitchen_virtual_file_count = surfkitchen_custom_file_info_ptr->virtual_file_info.virtual_file_count;
  472.         }
  473. #endif /* SUPPORT_SURFKITCHEN */
  474. #ifdef SUPPORT_MUSICWAV
  475.         musicwav_custom_file_info_ptr = (j2me_custom_file_info_struct*) (J2ME2ndJumpTbl[GAMETYPE_MUSICWAV]);
  476.         if (musicwav_custom_file_info_ptr)
  477.         {
  478.             musicwav_default_game_count = musicwav_custom_file_info_ptr->default_mids_count;
  479.             musicwav_virtual_file_count = musicwav_custom_file_info_ptr->virtual_file_info.virtual_file_count;
  480.         }
  481. #endif /* SUPPORT_MUSICWAV */
  482.     }
  483. #endif /* __J2ME__ */ 
  484.     if (((kal_uint32) langpack_JTbl > 0x1) && ((kal_uint32) & LangPackResPreamble > 0x1))       /* dummy reference to make the variable exist */
  485.     {
  486.         gLanguageArray = (sLanguageDetails*) (langpack2ndJumpTbl[0]);
  487.         gMaxDeployedLangs = *((unsigned short*)(langpack2ndJumpTbl[1]));
  488.         gStringList = (StringResList*) (langpack2ndJumpTbl[2]);
  489.         if (gIMEModule != *((sIMEModuleDetails*) (langpack2ndJumpTbl[6])))
  490.         {
  491.             ASSERT(0);
  492.         }
  493.         gIMEModeArray = (sIMEModeDetails*) (langpack2ndJumpTbl[3]);
  494.         gIMEQSearchModeArray = (sIMEModeDetails*) (langpack2ndJumpTbl[4]);
  495.         gIMELDBArray = (sIMELDBDetails*) (langpack2ndJumpTbl[5]);
  496.     #if defined(__MMI_T9__)
  497.     #if defined(__MMI_T9_TR_CHINESE__)
  498.     #if defined(__MMI_T9_V7__)
  499.         gT9TRChineseLDB = *((T9ChineseData const T9FARDATA*)(langpack2ndJumpTbl[7]));
  500.     #else 
  501.         gT9TRChineseLDB = *((T9ChineseData const FARDATA*)(langpack2ndJumpTbl[7]));
  502.     #endif 
  503.     #endif /* defined(__MMI_T9_TR_CHINESE__) */ 
  504.     #if defined(__MMI_T9_SM_CHINESE__)
  505.     #if defined(__MMI_T9_V7__)
  506.         gT9SMChineseLDB = *((T9ChineseData const T9FARDATA*)(langpack2ndJumpTbl[8]));
  507.     #else 
  508.         gT9SMChineseLDB = *((T9ChineseData const FARDATA*)(langpack2ndJumpTbl[8]));
  509.     #endif 
  510.     #endif /* defined(__MMI_T9_SM_CHINESE__) */ 
  511.     #endif /* defined(__MMI_T9__) */ 
  512.         nCustMenus = (CUSTOM_MENU *)(langpack2ndJumpTbl[9]);//071706 menu resource
  513.     }
  514.     /* CustPack Initialization */
  515.     if (((kal_uint32) custpack2ndJumpTbl > 0x1) && ((kal_uint32) & CustPackResPreamble > 0x1))  /* dummy reference to make the variable exist */
  516.     {
  517.         /* CustPack NVRAM Initialized in NVRAM init procedure */
  518.         custpack_nvram_header_ptr = (custpack_nvram_header*) custpack_header[CUSTPACK_NVRAM];
  519.         /* CustPack Image Initialization */
  520.         pimage_header = (CUSTPACK_IMAGE_HEADER*) (custpack_header[CUSTPACK_IMAGE]);
  521.         nCustImageNamesEXT = (CUSTOM_IMAGE*) pimage_header->CustImageNamesEXT;
  522.         CurrMaxImageNumEXT = pimage_header->MaxImageNumEXT;
  523.         /* CustPack Autogen Audio Initialization */
  524.         paudio_header = (CUSTPACK_AUDIO_HEADER*) (custpack_header[CUSTPACK_AUTOGEN_AUDIO]);
  525.         nCustAudioNamesEXT = (CUSTOM_AUDIO*) paudio_header->CustAudioNamesEXT;
  526.         CurrMaxAudioNumEXT = paudio_header->MaxAudioNumEXT;
  527.     #if defined(OBIGO_SUPPORT) && defined(WAP_SUPPORT)
  528.         {
  529.             wap_custpack_header *custpack_wap_header_ptr = (wap_custpack_header*) custpack_header[CUSTPACK_WAP];
  530.             custpack_wap_default.wap_profile_default = custpack_wap_header_ptr->wap_profile_default;
  531.             custpack_wap_default.mms_profile_default = custpack_wap_header_ptr->mms_profile_default;
  532.             custpack_wap_default.wap_bkm_default = custpack_wap_header_ptr->wap_bkm_default;
  533.             custpack_wap_default.wap_root_ca_default = custpack_wap_header_ptr->wap_root_ca_default;
  534.             custpack_wap_default.wap_config_default = custpack_wap_header_ptr->wap_config_default;
  535.             custpack_wap_default.mms_config_default = custpack_wap_header_ptr->mms_config_default;
  536.         }
  537.     #endif /* defined(OBIGO_SUPPORT) && defined(WAP_SUPPORT) */ 
  538.     }
  539.     StandaloneResValidation();
  540. }
  541. #else /* MMI_ON_HARDWARE_P */ /* PC_SIMULATOR */
  542. /* MTK Leo add,20040318, for new simulator */
  543. HINSTANCE hinstLib;
  544. device_tones_struct **resource_tones = NULL;
  545. audio_resource_struct *resource_midis = NULL;
  546. audio_resource_struct *resource_sounds = NULL;
  547. audio_resource_struct *resource_ems_sounds = NULL;
  548. audio_resource_struct *resource_imelodys = NULL;
  549. audio_resource_struct *resource_ems_imelodys = NULL;
  550. audio_resource_struct *resource_message_sounds = NULL;
  551. audio_resource_struct *resource_mms_sounds = NULL;
  552. #ifdef DIGIT_TONE_SUPPORT
  553. audio_resource_struct *resource_human_voice_tones = NULL;
  554. #endif 
  555. #ifdef SIMPLE_TTS
  556. audio_resource_struct *resource_tts_sounds = NULL;
  557. start_end_t *TTS_UCS2_MSB_index = NULL;
  558. unsigned char *TTS_UCS2_LSB = NULL;
  559. unsigned short *TTS_index_table = NULL;
  560. #endif /* SIMPLE_TTS */ 
  561. #ifdef CUST_KEYPAD_TONE_SUPPORT
  562. audio_resource_struct *resource_keypad_tones = NULL;
  563. #endif 
  564. /* Img variables */
  565. CUSTOM_IMAGE *nCustImageNames;
  566. CUSTOM_IMAGE_MAP *ImageIdMap;
  567. U16 CurrMaxImageId;     /* Max String Ids */
  568. U16 *pCurrMaxImageId;   /* Max String Ids */
  569. U16 CurrMaxSearchImageId;
  570. U16 *pCurrMaxSearchImageId;
  571. U16 CurrMaxImageNum;    /* Max Number Ids */
  572. U16 *pCurrMaxImageNum;  /* Max Number Ids */
  573. const CUSTOM_IMAGE_SEARCH_MAP *ImageIdSearchMap;
  574. /* CustPack Image variables */
  575. CUSTPACK_IMAGE_HEADER *pimage_header;
  576. CUSTOM_IMAGE *nCustImageNamesEXT;
  577. CUSTOM_IMAGE_MAP *ImageIdMapEXT;
  578. U16 CurrMaxImageIdEXT;      /* Max String Ids */
  579. U16 *pCurrMaxImageIdEXT;    /* Max String Ids */
  580. U16 CurrMaxSearchImageIdEXT;
  581. U16 *pCurrMaxSearchImageIdEXT;
  582. U16 CurrMaxImageNumEXT;     /* Max Number Ids */
  583. const CUSTOM_IMAGE_SEARCH_MAP *ImageIdSearchMapEXT;
  584. /* 101205 audio resource Calvin Satrt */
  585. /* Ado variables */
  586. CUSTOM_AUDIO *nCustAudioNames;
  587. CUSTOM_AUDIO_MAP *AudioIdMap;
  588. U16 CurrMaxAudioId;
  589. U16 *pCurrMaxAudioId;
  590. U16 CurrMaxSearchAudioId;
  591. U16 *pCurrMaxSearchAudioId;
  592. U16 CurrMaxAudioNum;
  593. U16 *pCurrMaxAudioNum;
  594. const CUSTOM_AUDIO_SEARCH_MAP *AudioIdSearchMap;
  595. /* CustPack Audio variables */
  596. CUSTPACK_AUDIO_HEADER *paudio_header;
  597. CUSTOM_AUDIO *nCustAudioNamesEXT;
  598. CUSTOM_AUDIO_MAP *AudioIdMapEXT;
  599. U16 CurrMaxAudioIdEXT;
  600. U16 *pCurrMaxAudioIdEXT;
  601. U16 CurrMaxSearchAudioIdEXT;
  602. U16 *pCurrMaxSearchAudioIdEXT;
  603. U16 CurrMaxAudioNumEXT;
  604. const CUSTOM_AUDIO_SEARCH_MAP *AudioIdSearchMapEXT;
  605. /* 101205 audio resource Calvin End */
  606. /* 101806 E-NFB start */
  607. #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
  608. U32 CurrMaxENFBAssociatedIDNum = 0;
  609. CUSTOM_ENFB *AssociatedID_map = NULL;
  610. #endif
  611. /* 101806 E-NFB end */
  612. /* Menu variables */
  613. CUSTOM_MENU *nCustMenus;
  614. /* Str variables */
  615. StringResList *gStringList = NULL;
  616. /* Language variables */
  617. sLanguageDetails *gLanguageArray;
  618. U16 gMaxDeployedLangs;
  619. U16 *pgMaxDeployedLangs = NULL;
  620. /* Font variables */
  621. stFontAttribute *pUI_DEFAULT_FONT;
  622. stFontAttribute UI_DEFAULT_FONT;
  623. stFontAttribute *pMMI_default_font;
  624. stFontAttribute MMI_default_font;
  625. stFontAttribute *pMMI_large_font;
  626. stFontAttribute MMI_large_font;
  627. stFontAttribute *pMMI_medium_font;
  628. stFontAttribute MMI_medium_font;
  629. stFontAttribute *pMMI_small_font;
  630. stFontAttribute MMI_small_font;
  631. stFontAttribute *pMMI_medium_bold_font;
  632. stFontAttribute MMI_medium_bold_font;
  633. stFontAttribute *pMMI_medium_bold_font;
  634. stFontAttribute MMI_medium_bold_font;
  635. stFontAttribute *pwgui_dialer_box_f1;
  636. stFontAttribute wgui_dialer_box_f1;
  637. stFontAttribute *pwgui_dialer_box_f2;
  638. stFontAttribute wgui_dialer_box_f2;
  639. stFontAttribute *pMMI_sublcd_font;
  640. stFontAttribute MMI_sublcd_font;
  641. stFontAttribute *pMMI_virtual_keyboard_font;
  642. stFontAttribute MMI_virtual_keyboard_font;
  643. /* __CUSTPACK_MULTIBIN     Terry   BEGIN */
  644. /* IME variables */
  645. #if defined(__MMI_T9__)
  646. #if defined(__MMI_T9_V7__)
  647. const sIMEModuleDetails gIMEModule = T9V7;
  648. #else 
  649. const sIMEModuleDetails gIMEModule = T9V6;
  650. #endif 
  651. #elif defined(__MMI_ZI__)
  652. const sIMEModuleDetails gIMEModule = ZiV6;
  653. #else 
  654. const sIMEModuleDetails gIMEModule = IME_OTHERS;
  655. #endif 
  656. const sIMEModeDetails *gIMEModeArray = NULL;
  657. const sIMEModeDetails *gIMEQSearchModeArray = NULL;
  658. const sIMELDBDetails *gIMELDBArray = NULL;
  659. #if defined(__MMI_T9__)
  660. #if defined(__MMI_T9_V7__)
  661. T9ChineseData T9FARDATA *pgT9TRChineseLDB;
  662. T9ChineseData T9FARDATA gT9TRChineseLDB;
  663. T9ChineseData T9FARDATA *pgT9SMChineseLDB;
  664. T9ChineseData T9FARDATA gT9SMChineseLDB;
  665. #else /* defined(__MMI_T9_V7__) */ 
  666. T9ChineseData FARDATA *pgT9TRChineseLDB;
  667. T9ChineseData FARDATA gT9TRChineseLDB;
  668. T9ChineseData FARDATA *pgT9SMChineseLDB;
  669. T9ChineseData FARDATA gT9SMChineseLDB;
  670. #endif /* defined(__MMI_T9_V7__) */ 
  671. #endif /* defined(__MMI_T9__) */ 
  672. /* __CUSTPACK_MULTIBIN     Terry   END */
  673. /* Theme variables */
  674. S32 *pn_MMI_themes;
  675. S32 n_MMI_themes;
  676. PS8 mmi_theme_phone_model;
  677. #ifdef __MMI_THEMES_V2_SUPPORT__
  678. theme_details_struct *MMI_themes;
  679. #else 
  680. MMI_theme **MMI_themes;
  681. #endif 
  682. /*****************************************************************************
  683.  * FUNCTION
  684.  *  InitializeResourceVariables
  685.  * DESCRIPTION
  686.  *  
  687.  * PARAMETERS
  688.  *  void
  689.  * RETURNS
  690.  *  void
  691.  *****************************************************************************/
  692. void InitializeResourceVariables(void)
  693. {
  694.     /*----------------------------------------------------------------*/
  695.     /* Local Variables                                                */
  696.     /*----------------------------------------------------------------*/
  697.     int fRunTimeLinkSuccess = 0;
  698.     /*----------------------------------------------------------------*/
  699.     /* Code Body                                                      */
  700.     /*----------------------------------------------------------------*/
  701.     /* Load dll */
  702.     hinstLib = LoadLibrary("mmiresource");
  703.     /* assign address */
  704.     if (hinstLib != NULL)
  705.     {
  706.         nCustImageNames = (CUSTOM_IMAGE*) GetProcAddress(hinstLib, "mtk_nCustImageNames");
  707.         pCurrMaxImageId = (U16*) GetProcAddress(hinstLib, "CurrMaxImageId");
  708.         CurrMaxImageId = *pCurrMaxImageId;
  709.         pCurrMaxSearchImageId = (U16*) GetProcAddress(hinstLib, "CurrMaxSearchImageId");
  710.         CurrMaxSearchImageId = *pCurrMaxSearchImageId;
  711.         pCurrMaxImageNum = (U16*) GetProcAddress(hinstLib, "mtk_CurrMaxImageNum");
  712.         CurrMaxImageNum = *pCurrMaxImageNum;
  713.         ImageIdMap = (CUSTOM_IMAGE_MAP*) GetProcAddress(hinstLib, "ImageIdMap");
  714.         ImageIdSearchMap = (CUSTOM_IMAGE_SEARCH_MAP*) GetProcAddress(hinstLib, "ImageIdSearchMap");
  715.         /* __CUSTPACK_MULTIBIN Calvin BEGIN */
  716.         /* 040805 CustPack: Calvin added */
  717.         pimage_header = (CUSTPACK_IMAGE_HEADER*) GetProcAddress(hinstLib, "mtk_image_header");
  718.         /* nCustImageNamesEXT = (CUSTOM_IMAGE*) GetProcAddress(hinstLib,"mtk_nCustImageNamesEXT"); */
  719.         nCustImageNamesEXT = (CUSTOM_IMAGE*) pimage_header->CustImageNamesEXT;
  720.         pCurrMaxImageIdEXT = (U16*) GetProcAddress(hinstLib, "CurrMaxImageIdEXT");
  721.         CurrMaxImageIdEXT = *pCurrMaxImageIdEXT;
  722.         pCurrMaxSearchImageIdEXT = (U16*) GetProcAddress(hinstLib, "CurrMaxSearchImageIdEXT");
  723.         CurrMaxSearchImageIdEXT = *pCurrMaxSearchImageIdEXT;
  724.         //pCurrMaxImageNumEXT = (U16*) GetProcAddress(hinstLib,"mtk_CurrMaxImageNumEXT");
  725.         //CurrMaxImageNumEXT = *pCurrMaxImageNumEXT;
  726.         CurrMaxImageNumEXT = pimage_header->MaxImageNumEXT;
  727.         ImageIdMapEXT = (CUSTOM_IMAGE_MAP*) GetProcAddress(hinstLib, "ImageIdMapEXT");
  728.         ImageIdSearchMapEXT = (CUSTOM_IMAGE_SEARCH_MAP*) GetProcAddress(hinstLib, "ImageIdSearchMapEXT");
  729.         /* Calvin end */
  730.         /* __CUSTPACK_MULTIBIN Calvin END */
  731.         /* 101806 E-NFB start */
  732. #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
  733.         CurrMaxENFBAssociatedIDNum = *(U32 *)GetProcAddress(hinstLib, "CurrMaxENFBAssociatedIDNum");
  734.         AssociatedID_map = (CUSTOM_ENFB *)GetProcAddress(hinstLib, "AssociatedID_map");
  735. #endif /* __MMI_RESOURCE_ENFB_SUPPORT__ */
  736.         /* 101806 E-NFB end */
  737.         /* 101205 audio resource Calvin Start */
  738.         nCustAudioNames = (CUSTOM_AUDIO*) GetProcAddress(hinstLib, "mtk_nCustAudioNames");
  739.         pCurrMaxAudioId = (U16*) GetProcAddress(hinstLib, "CurrMaxAudioId");
  740.         CurrMaxAudioId = *pCurrMaxAudioId;
  741.         pCurrMaxSearchAudioId = (U16*) GetProcAddress(hinstLib, "CurrMaxSearchAudioId");
  742.         CurrMaxSearchAudioId = *pCurrMaxSearchAudioId;
  743.         pCurrMaxAudioNum = (U16*) GetProcAddress(hinstLib, "mtk_CurrMaxAudioNum");
  744.         CurrMaxAudioNum = *pCurrMaxAudioNum;
  745.         AudioIdMap = (CUSTOM_AUDIO_MAP*) GetProcAddress(hinstLib, "AudioIdMap");
  746.         AudioIdSearchMap = (CUSTOM_AUDIO_SEARCH_MAP*) GetProcAddress(hinstLib, "AudioIdSearchMap");
  747.         paudio_header = (CUSTPACK_AUDIO_HEADER*) GetProcAddress(hinstLib, "mtk_audio_header");
  748.         nCustAudioNamesEXT = (CUSTOM_AUDIO*) paudio_header->CustAudioNamesEXT;
  749.         pCurrMaxAudioIdEXT = (U16*) GetProcAddress(hinstLib, "CurrMaxAudioIdEXT");
  750.         CurrMaxAudioIdEXT = *pCurrMaxAudioIdEXT;
  751.         pCurrMaxSearchAudioIdEXT = (U16*) GetProcAddress(hinstLib, "CurrMaxSearchAudioIdEXT");
  752.         CurrMaxSearchAudioIdEXT = *pCurrMaxSearchAudioIdEXT;
  753.         CurrMaxAudioNumEXT = paudio_header->MaxAudioNumEXT;
  754.         AudioIdMapEXT = (CUSTOM_AUDIO_MAP*) GetProcAddress(hinstLib, "AudioIdMapEXT");
  755.         AudioIdSearchMapEXT = (CUSTOM_AUDIO_SEARCH_MAP*) GetProcAddress(hinstLib, "AudioIdSearchMapEXT");
  756.         /* 101205 audio resource End */
  757.         nCustMenus = (CUSTOM_MENU*) GetProcAddress(hinstLib, "mtk_nCustMenus");//071706 menu resource
  758.         gStringList = (StringResList*) GetProcAddress(hinstLib, "mtk_gStringList");
  759.         pgMaxDeployedLangs = (U16*) GetProcAddress(hinstLib, "mtk_gMaxDeployedLangs");
  760.         gMaxDeployedLangs = *pgMaxDeployedLangs;
  761.         gLanguageArray = (sLanguageDetails*) GetProcAddress(hinstLib, "mtk_gLanguageArray");
  762.         pUI_DEFAULT_FONT = (stFontAttribute*) GetProcAddress(hinstLib, "UI_DEFAULT_FONT");
  763.         UI_DEFAULT_FONT = *pUI_DEFAULT_FONT;
  764.         pMMI_default_font = (stFontAttribute*) GetProcAddress(hinstLib, "MMI_default_font");
  765.         MMI_default_font = *pMMI_default_font;
  766.         pMMI_large_font = (stFontAttribute*) GetProcAddress(hinstLib, "MMI_large_font");
  767.         MMI_large_font = *pMMI_large_font;
  768.         pMMI_medium_font = (stFontAttribute*) GetProcAddress(hinstLib, "MMI_medium_font");
  769.         MMI_medium_font = *pMMI_medium_font;
  770.         pMMI_medium_bold_font = (stFontAttribute*) GetProcAddress(hinstLib, "MMI_medium_bold_font");
  771.         MMI_medium_bold_font = *pMMI_medium_bold_font;
  772.         pMMI_small_font = (stFontAttribute*) GetProcAddress(hinstLib, "MMI_small_font");
  773.         MMI_small_font = *pMMI_small_font;
  774.         pwgui_dialer_box_f1 = (stFontAttribute*) GetProcAddress(hinstLib, "wgui_dialer_box_f1");
  775.         wgui_dialer_box_f1 = *pwgui_dialer_box_f1;
  776.         pwgui_dialer_box_f2 = (stFontAttribute*) GetProcAddress(hinstLib, "wgui_dialer_box_f2");
  777.         wgui_dialer_box_f2 = *pwgui_dialer_box_f2;
  778.         pMMI_sublcd_font = (stFontAttribute*) GetProcAddress(hinstLib, "MMI_sublcd_font");
  779.         MMI_sublcd_font = *pMMI_sublcd_font;
  780.         pMMI_virtual_keyboard_font = (stFontAttribute*) GetProcAddress(hinstLib, "MMI_virtual_keyboard_font");
  781.         MMI_virtual_keyboard_font = *pMMI_virtual_keyboard_font;
  782.         /* __CUSTPACK_MULTIBIN     Terry   BEGIN */
  783.         gIMEModeArray = (sIMEModeDetails*) GetProcAddress(hinstLib, "mtk_gIMEModeArray");
  784.         gIMEQSearchModeArray = (sIMEModeDetails*) GetProcAddress(hinstLib, "mtk_gIMEQSearchModeArray");
  785.         gIMELDBArray = (sIMELDBDetails*) GetProcAddress(hinstLib, "mtk_gIMELDBArray");
  786.     #if defined(__MMI_T9__)
  787.     #if defined(__MMI_T9_TR_CHINESE__)
  788.     #if defined(__MMI_T9_V7__)
  789.         pgT9TRChineseLDB = ((T9ChineseData const T9FARDATA*)GetProcAddress(hinstLib, "l0104"));
  790.         gT9TRChineseLDB = *pgT9TRChineseLDB;
  791.     #else /* defined(__MMI_T9_V7__) */ 
  792.         pgT9TRChineseLDB = ((T9ChineseData const FARDATA*)GetProcAddress(hinstLib, "l0104"));
  793.         gT9TRChineseLDB = *pgT9TRChineseLDB;
  794.     #endif /* defined(__MMI_T9_V7__) */ 
  795.     #endif /* defined(__MMI_T9_TR_CHINESE__) */ 
  796.     #if defined(__MMI_T9_SM_CHINESE__)
  797.     #if defined(__MMI_T9_V7__)
  798.         pgT9SMChineseLDB = ((T9ChineseData const T9FARDATA*)(GetProcAddress(hinstLib, "l0204")));
  799.         gT9SMChineseLDB = *pgT9SMChineseLDB;
  800.     #else /* defined(__MMI_T9_V7__) */ 
  801.         pgT9SMChineseLDB = ((T9ChineseData const FARDATA*)(GetProcAddress(hinstLib, "l0204")));
  802.         gT9SMChineseLDB = *pgT9SMChineseLDB;
  803.     #endif /* defined(__MMI_T9_V7__) */ 
  804.     #endif /* defined(__MMI_T9_SM_CHINESE__) */ 
  805.     #endif /* defined(__MMI_T9__) */ 
  806.         /* __CUSTPACK_MULTIBIN     Terry   END */
  807.         pn_MMI_themes = (S32*) GetProcAddress(hinstLib, "mtk_n_MMI_themes");
  808.         n_MMI_themes = *pn_MMI_themes;
  809.     #ifdef __MMI_THEMES_V2_SUPPORT__
  810.         MMI_themes = (theme_details_struct*) GetProcAddress(hinstLib, "mtk_MMI_themes");
  811.     #else 
  812.         MMI_themes = (MMI_theme **) GetProcAddress(hinstLib, "mtk_MMI_themes");
  813.     #endif 
  814.         mmi_theme_phone_model = (char*)GetProcAddress(hinstLib, "theme_phone_model");
  815.     }
  816. }
  817. /* MTK Leo end, new Simulator */
  818. #endif /* MMI_ON_HARDWARE_P */