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

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.  * Filename:
  37.  * ---------
  38.  *  Wrapper.c
  39.  *
  40.  * Project:
  41.  * --------
  42.  *  MAUI
  43.  *
  44.  * Description:
  45.  * ------------
  46.  *  
  47.  *
  48.  * Author:
  49.  * -------
  50.  *  
  51.  *
  52.  *==============================================================================
  53.  *             HISTORY
  54.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  55.  *------------------------------------------------------------------------------
  56.  * removed!
  57.  *
  58.  * removed!
  59.  * removed!
  60.  * removed!
  61.  *
  62.  * removed!
  63.  * removed!
  64.  * removed!
  65.  *
  66.  * removed!
  67.  * removed!
  68.  * removed!
  69.  *
  70.  * removed!
  71.  * removed!
  72.  * removed!
  73.  * removed!
  74.  *
  75.  *------------------------------------------------------------------------------
  76.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  77.  *==============================================================================
  78.  *******************************************************************************/
  79. /**
  80.  * Copyright Notice
  81.  * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
  82.  * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
  83.  *  (It is illegal to remove this copyright notice from this software or any
  84.  *  portion of it)
  85.  */
  86. /**************************************************************
  87.    FILENAME : Wrapper.c
  88.    PURPOSE     : OS wrapper functions to make the task structure functionality 
  89.             independant of underlying operating system. 
  90.    REMARKS     : nil
  91.    AUTHOR      : Neeraj Sharma
  92.    DATE     : Dec' 28, 2002
  93. **************************************************************/
  94. /* Include files ----------------------------------- */
  95. /* [001] */
  96. #include "WrapperGprot.h"
  97. #include "pixteldatatypes.h"
  98. #ifdef MMI_ON_WIN32
  99. #include "TaskInit.h"
  100. #include "QueueGprot.h"
  101. #include "NVRAMProt.h"
  102. #include "stdafx.h"
  103. extern CRITICAL_SECTION TimerCS;
  104. oslSoftTimerid TimerId[MAX_TIMERS];
  105. oslTimerid TimerCallBackHdlr;
  106. #include <assert.h>
  107. #endif /* MMI_ON_WIN32 */ 
  108. #ifndef MMI_ON_WIN32
  109. #include "l4dr.h"
  110. #endif 
  111. #include "oslmemory.h"
  112. /* Macros and Data Structor Declerations -------------- */
  113. /* static oslTimerid TimerPtrs[MAX_TIMERS]; */
  114. static U8 TimerExist[MAX_TIMERS];
  115. /* kill all the semaphore and thread objects     */
  116. /* ------Functions Decleration ------------------------------------- */
  117. /*-------------------------------------------------------------------
  118. Function Name  :  oslTaskid OslIntCreateTask
  119. Description    :  This module creates the task 
  120. Input       :  PS8 task_name,
  121.                U8 priority,
  122.                U32 stack_size,
  123.                oslTaskFuncPtr entry_func,
  124.                void * entry_param,
  125.                U8 misc_options
  126. Output         :  taskID
  127. -------------------------------------------------------------------*/
  128. /*****************************************************************************
  129.  * FUNCTION
  130.  *  OslIntCreateTask
  131.  * DESCRIPTION
  132.  *  
  133.  * PARAMETERS
  134.  *  task_name           [IN]        
  135.  *  priority            [IN]        
  136.  *  stack_size          [IN]        
  137.  *  entry_func          [IN]        
  138.  *  entry_param         [?]         
  139.  *  misc_options        [IN]        
  140.  * RETURNS
  141.  *  
  142.  *****************************************************************************/
  143. oslTaskid OslIntCreateTask(
  144.             PS8 task_name,
  145.             U8 priority,
  146.             U32 stack_size,
  147.             oslTaskFuncPtr entry_func,
  148.             void *entry_param,
  149.             U8 misc_options)
  150. {
  151. #ifdef MMI_ON_WIN32
  152.     /*----------------------------------------------------------------*/
  153.     /* Local Variables                                                */
  154.     /*----------------------------------------------------------------*/
  155.     U32 tThreadId;
  156.     U32 win32_priority;
  157.     oslTaskid taskid;
  158.     /*----------------------------------------------------------------*/
  159.     /* Code Body                                                      */
  160.     /*----------------------------------------------------------------*/
  161.     taskid = CreateThread(
  162.                 NULL,
  163.                 stack_size,
  164.                 (LPTHREAD_START_ROUTINE) entry_func,
  165.                 entry_param,
  166.                 CREATE_SUSPENDED,
  167.                 &tThreadId);
  168.     if (priority >= 0 && priority < 52)
  169.     {
  170.         win32_priority = THREAD_PRIORITY_HIGHEST;
  171.     }
  172.     else if (priority >= 52 && priority < 104)
  173.     {
  174.         win32_priority = THREAD_PRIORITY_ABOVE_NORMAL;
  175.     }
  176.     else if (priority >= 104 && priority < 156)
  177.     {
  178.         win32_priority = THREAD_PRIORITY_NORMAL;
  179.     }
  180.     else if (priority >= 156 && priority < 208)
  181.     {
  182.         win32_priority = THREAD_PRIORITY_BELOW_NORMAL;
  183.     }
  184.     else if (priority >= 208 && priority <= 255)
  185.     {
  186.         win32_priority = THREAD_PRIORITY_LOWEST;
  187.     }
  188.     SetThreadPriority(taskid, win32_priority);
  189.     ResumeThread(taskid);
  190.     return taskid;
  191. #else /* MMI_ON_WIN32 */ 
  192.     return NULL;
  193. #endif /* MMI_ON_WIN32 */ 
  194. }
  195. /*-------------------------------------------------------------------
  196. Function Name  :  OslIntDleteTask
  197. Description    :  This module creates the task 
  198. Input       :  TaskID
  199. Output         :  TRYE or FALSE
  200. -------------------------------------------------------------------*/
  201. /*****************************************************************************
  202.  * FUNCTION
  203.  *  OslIntDleteTask
  204.  * DESCRIPTION
  205.  *  
  206.  * PARAMETERS
  207.  *  taskid      [IN]        
  208.  * RETURNS
  209.  *  
  210.  *****************************************************************************/
  211. OSLSTATUS OslIntDleteTask(oslTaskid taskid)
  212. {
  213.     /*----------------------------------------------------------------*/
  214.     /* Local Variables                                                */
  215.     /*----------------------------------------------------------------*/
  216.     /*----------------------------------------------------------------*/
  217.     /* Code Body                                                      */
  218.     /*----------------------------------------------------------------*/
  219. #ifdef MMI_ON_WIN32
  220.     CloseHandle(taskid);
  221. #endif 
  222.     return OSL_SUCCESS;
  223. }
  224. /*-------------------------------------------------------------------
  225. Function Name  :  StartMyTimer
  226. Description    :  This module starts the timer
  227. Input       :  unsigned short nTimerId,
  228.                unsigned short nTimeDuration,
  229.                oslTimerFuncPtr TimerExpiry)
  230. Output         :  BOOL
  231. -------------------------------------------------------------------*/
  232. /*****************************************************************************
  233.  * FUNCTION
  234.  *  StartMyTimerInt
  235.  * DESCRIPTION
  236.  *  
  237.  * PARAMETERS
  238.  *  nTimerId            [IN]        
  239.  *  nTimeDuration       [IN]        
  240.  *  TimerExpiry         [IN]        
  241.  *  alignment           [IN]        
  242.  * RETURNS
  243.  *  
  244.  *****************************************************************************/
  245. U16 StartMyTimerInt(U16 nTimerId, U32 nTimeDuration, oslTimerFuncPtr TimerExpiry, U8 alignment)
  246. {
  247.     /*----------------------------------------------------------------*/
  248.     /* Local Variables                                                */
  249.     /*----------------------------------------------------------------*/
  250.     /*----------------------------------------------------------------*/
  251.     /* Code Body                                                      */
  252.     /*----------------------------------------------------------------*/
  253.     if (TimerExist[nTimerId])
  254.     {
  255.         OslStopSoftTimer(nTimerId);
  256.     }
  257.     OslStartSoftTimer(nTimerId, TimerExpiry, nTimerId, nTimeDuration, alignment);
  258.     TimerExist[nTimerId] = 1;
  259.     return TRUE;
  260. }
  261. /*-------------------------------------------------------------------
  262. Function Name  :  StopMyTimer
  263. Description    :  This module stops the timer
  264. Input       :  timerID
  265. Output         :  bool
  266. -------------------------------------------------------------------*/
  267. /*****************************************************************************
  268.  * FUNCTION
  269.  *  StopMyTimer
  270.  * DESCRIPTION
  271.  *  
  272.  * PARAMETERS
  273.  *  nTimerId        [IN]        
  274.  * RETURNS
  275.  *  
  276.  *****************************************************************************/
  277. U16 StopMyTimer(U16 nTimerId)
  278. {
  279.     /*----------------------------------------------------------------*/
  280.     /* Local Variables                                                */
  281.     /*----------------------------------------------------------------*/
  282.     /*----------------------------------------------------------------*/
  283.     /* Code Body                                                      */
  284.     /*----------------------------------------------------------------*/
  285.     if (TimerExist[nTimerId])
  286.     {
  287.         OslStopSoftTimer(nTimerId);
  288.         TimerExist[nTimerId] = 0;
  289.     }
  290.     return TRUE;
  291. }
  292. /*-------------------------------------------------------------------
  293. Function Name  :  IsMyTimerExist
  294. Description    :  This module stops the timer
  295. Input       :  timerID
  296. Output         :  bool
  297. -------------------------------------------------------------------*/
  298. /*****************************************************************************
  299.  * FUNCTION
  300.  *  IsMyTimerExist
  301.  * DESCRIPTION
  302.  *  
  303.  * PARAMETERS
  304.  *  nTimerId        [IN]        
  305.  * RETURNS
  306.  *  
  307.  *****************************************************************************/
  308. BOOL IsMyTimerExist(U16 nTimerId)
  309. {
  310.     /*----------------------------------------------------------------*/
  311.     /* Local Variables                                                */
  312.     /*----------------------------------------------------------------*/
  313.     /*----------------------------------------------------------------*/
  314.     /* Code Body                                                      */
  315.     /*----------------------------------------------------------------*/
  316.     if (TimerExist[nTimerId] == 1)
  317.     {
  318.         return TRUE;
  319.     }
  320.     else
  321.     {
  322.         return FALSE;
  323.     }
  324. }
  325. /*-------------------------------------------------------------------
  326. Function Name  :  KillObjects
  327. Description    :  This module kills the object but 
  328.                currently of no use
  329. Input       :  null
  330. Output         :  bool
  331. -------------------------------------------------------------------*/
  332. /*****************************************************************************
  333.  * FUNCTION
  334.  *  KillObjects
  335.  * DESCRIPTION
  336.  *  
  337.  * PARAMETERS
  338.  *  void
  339.  * RETURNS
  340.  *  
  341.  *****************************************************************************/
  342. U16 KillObjects(void)
  343. {
  344. #ifdef MMI_ON_WIN32
  345.     /*----------------------------------------------------------------*/
  346.     /* Local Variables                                                */
  347.     /*----------------------------------------------------------------*/
  348.     U16 i;
  349.     /*----------------------------------------------------------------*/
  350.     /* Code Body                                                      */
  351.     /*----------------------------------------------------------------*/
  352.     for (i = 9; i < TOTAL_TASKS; i++)
  353.     {
  354.         OslIntDleteTask(task_info_g1[i].task_id);
  355.         OslDeleteMsgQ(task_info_g1[i].task_ext_qid);
  356.     }
  357.     OslIntCancelTimer(TimerCallBackHdlr);
  358.     OslIntDeleteTimer(TimerCallBackHdlr);
  359.     for (i = 0; i < MAX_TIMERS; i++)
  360.         if (TimerExist[i])
  361.         {
  362.             OslStopSoftTimer(i);
  363.         }
  364. #endif /* MMI_ON_WIN32 */ 
  365.     return TRUE;
  366. }
  367. /*-------------------------------------------------------------------
  368. Function Name  :  OslIntCreateTimer
  369. Description    :  This module creates the timer
  370. Input       :  timer name
  371. Output         :  timer ID
  372. -------------------------------------------------------------------*/
  373. /*****************************************************************************
  374.  * FUNCTION
  375.  *  OslIntCreateTimer
  376.  * DESCRIPTION
  377.  *  
  378.  * PARAMETERS
  379.  *  timer_name      [IN]        
  380.  * RETURNS
  381.  *  
  382.  *****************************************************************************/
  383. oslTimerid OslIntCreateTimer(PS8 timer_name)
  384. {
  385. #ifdef MMI_ON_WIN32
  386.     /*----------------------------------------------------------------*/
  387.     /* Local Variables                                                */
  388.     /*----------------------------------------------------------------*/
  389.     win32_timerid *tmrid;
  390.     /*----------------------------------------------------------------*/
  391.     /* Code Body                                                      */
  392.     /*----------------------------------------------------------------*/
  393.     tmrid = (win32_timerid*) OslMalloc(sizeof(win32_timerid));
  394.     strcpy(tmrid->tmr_name, timer_name);
  395.     tmrid->tmr_handler = 0;
  396.     tmrid->tmr_timeout = 0;
  397.     tmrid->tmr_callback = NULL;
  398.     tmrid->tmr_callback_arg = NULL;
  399.     return tmrid;
  400. #else /* MMI_ON_WIN32 */ 
  401.     return NULL;
  402. #endif /* MMI_ON_WIN32 */ 
  403. }
  404. /*-------------------------------------------------------------------
  405. Function Name  :  OslIntSetTimer
  406. Description    :  This module sets the timer
  407. Input       :  oslTimerid timerid, 
  408.                oslTimerFuncPtr func_ptr,
  409.                void * funcArg,
  410.                U32 timeDurationMsec
  411. Output         :  bool
  412. -------------------------------------------------------------------*/
  413. /*****************************************************************************
  414.  * FUNCTION
  415.  *  OslIntSetTimer
  416.  * DESCRIPTION
  417.  *  
  418.  * PARAMETERS
  419.  *  timerid                 [IN]        
  420.  *  func_ptr                [IN]        
  421.  *  funcArg                 [?]         
  422.  *  timeDurationMsec        [IN]        
  423.  * RETURNS
  424.  *  
  425.  *****************************************************************************/
  426. OSLSTATUS OslIntSetTimer(oslTimerid timerid, oslTimerFuncPtr func_ptr, void *funcArg, U32 timeDurationMsec)
  427. {
  428. #ifdef MMI_ON_WIN32
  429.     /*----------------------------------------------------------------*/
  430.     /* Local Variables                                                */
  431.     /*----------------------------------------------------------------*/
  432.     extern HWND hWnd;
  433.     /*----------------------------------------------------------------*/
  434.     /* Code Body                                                      */
  435.     /*----------------------------------------------------------------*/
  436.     timerid->tmr_callback = func_ptr;
  437.     timerid->tmr_callback_arg = funcArg;
  438.     timerid->tmr_timeout = timeDurationMsec;
  439.     timerid->tmr_handler = SetTimer(hWnd, (U32) timerid, timeDurationMsec, NULL);
  440. #endif /* MMI_ON_WIN32 */ 
  441.     return OSL_SUCCESS;
  442. }
  443. /*-------------------------------------------------------------------
  444. Function Name  :  OslIntCancelTimer
  445. Description    :  This module cancels the timer
  446. Input       :  timerID
  447. Output         :  bool
  448. -------------------------------------------------------------------*/
  449. /*****************************************************************************
  450.  * FUNCTION
  451.  *  OslIntCancelTimer
  452.  * DESCRIPTION
  453.  *  
  454.  * PARAMETERS
  455.  *  timerid     [IN]        
  456.  * RETURNS
  457.  *  
  458.  *****************************************************************************/
  459. OSLSTATUS OslIntCancelTimer(oslTimerid timerid)
  460. {
  461. #ifdef MMI_ON_WIN32
  462.     /*----------------------------------------------------------------*/
  463.     /* Local Variables                                                */
  464.     /*----------------------------------------------------------------*/
  465.     extern HWND hWnd;
  466.     /*----------------------------------------------------------------*/
  467.     /* Code Body                                                      */
  468.     /*----------------------------------------------------------------*/
  469.     KillTimer(hWnd, (U32) timerid);
  470. #endif /* MMI_ON_WIN32 */ 
  471.     return OSL_SUCCESS;
  472. }
  473. /*-------------------------------------------------------------------
  474. Function Name  :  OslIntDeleteTimer 
  475. Description    :  This module delets the timer
  476. Input       :  timerID
  477. Output         :  bool
  478. -------------------------------------------------------------------*/
  479. /*****************************************************************************
  480.  * FUNCTION
  481.  *  OslIntDeleteTimer
  482.  * DESCRIPTION
  483.  *  
  484.  * PARAMETERS
  485.  *  timerid     [IN]        
  486.  * RETURNS
  487.  *  
  488.  *****************************************************************************/
  489. OSLSTATUS OslIntDeleteTimer(oslTimerid timerid)
  490. {
  491.     /*----------------------------------------------------------------*/
  492.     /* Local Variables                                                */
  493.     /*----------------------------------------------------------------*/
  494.     /*----------------------------------------------------------------*/
  495.     /* Code Body                                                      */
  496.     /*----------------------------------------------------------------*/
  497. #ifdef MMI_ON_WIN32
  498.     OslMfree(timerid);
  499. #endif 
  500.     return OSL_SUCCESS;
  501. }
  502. /*-------------------------------------------------------------------
  503. Function Name  :  OslIntStartSoftTimer 
  504. Description    :  This module starts the soft timer
  505. Input       :  timerID
  506. Output         :  bool
  507. -------------------------------------------------------------------*/
  508. /*****************************************************************************
  509.  * FUNCTION
  510.  *  OslIntStartSoftTimer
  511.  * DESCRIPTION
  512.  *  
  513.  * PARAMETERS
  514.  *  nTimerId                [IN]        
  515.  *  func_ptr                [IN]        
  516.  *  funcArg                 [?]         
  517.  *  timeDurationMsec        [IN]        
  518.  * RETURNS
  519.  *  
  520.  *****************************************************************************/
  521. OSLSTATUS OslIntStartSoftTimer(unsigned short nTimerId, oslTimerFuncPtr func_ptr, void *funcArg, U32 timeDurationMsec)
  522. {
  523. #ifdef MMI_ON_WIN32
  524.     /*----------------------------------------------------------------*/
  525.     /* Local Variables                                                */
  526.     /*----------------------------------------------------------------*/
  527.     oslSoftTimerid TempTimerId;
  528.     U32 nRoundOffMSec;
  529.     /*----------------------------------------------------------------*/
  530.     /* Code Body                                                      */
  531.     /*----------------------------------------------------------------*/
  532.     if (timeDurationMsec % TIMER_CALLBACK_RESOLUTION)
  533.     {
  534.         nRoundOffMSec = ((timeDurationMsec / TIMER_CALLBACK_RESOLUTION) + 1) * TIMER_CALLBACK_RESOLUTION;
  535.     }
  536.     else
  537.     {
  538.         nRoundOffMSec = timeDurationMsec;
  539.     }
  540.     TempTimerId = OslMalloc(sizeof(win32_soft_timerid));
  541.     TempTimerId->tmr_callback = func_ptr;
  542.     TempTimerId->tmr_callback_arg = funcArg;
  543.     TempTimerId->tmr_timeout = nRoundOffMSec;
  544.     TempTimerId->tmr_count = TempTimerId->tmr_timeout;
  545.     TempTimerId->tmr_state = OSL_RUN;
  546.     EnterCriticalSection(&TimerCS);
  547.     TimerId[nTimerId] = TempTimerId;
  548.     LeaveCriticalSection(&TimerCS);
  549. #endif /* MMI_ON_WIN32 */ 
  550.     return OSL_SUCCESS;
  551. }
  552. /*-------------------------------------------------------------------
  553. Function Name  :  OslIntStopSoftTimer 
  554. Description    :  This module stops the soft timer
  555. Input       :  timerID
  556. Output         :  bool
  557. -------------------------------------------------------------------*/
  558. /*****************************************************************************
  559.  * FUNCTION
  560.  *  OslIntStopSoftTimer
  561.  * DESCRIPTION
  562.  *  
  563.  * PARAMETERS
  564.  *  nTimerId        [IN]        
  565.  * RETURNS
  566.  *  
  567.  *****************************************************************************/
  568. OSLSTATUS OslIntStopSoftTimer(unsigned short nTimerId)
  569. {
  570. #ifdef MMI_ON_WIN32
  571.     /*----------------------------------------------------------------*/
  572.     /* Local Variables                                                */
  573.     /*----------------------------------------------------------------*/
  574.     /*----------------------------------------------------------------*/
  575.     /* Code Body                                                      */
  576.     /*----------------------------------------------------------------*/
  577.     EnterCriticalSection(&TimerCS);
  578.     if (TimerId[nTimerId] != NULL)
  579.     {
  580.         OslMfree(TimerId[nTimerId]);
  581.         TimerId[nTimerId] = NULL;
  582.     }
  583.     LeaveCriticalSection(&TimerCS);
  584. #endif /* MMI_ON_WIN32 */ 
  585.     return OSL_SUCCESS;
  586. }