⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 meta_error_handler.~cpp

📁 MTK_NVRAM_Editor的源码,可能对你们有用哦
💻 ~CPP
字号:
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2002
*
*****************************************************************************/

/*******************************************************************************
* Filename:
* ---------
*  META_error_handler.cpp
*
* Project:
* --------
*   META
*
* Description:
* ------------
*   META error handler
*
* Author:
* -------
*  FZ Hsu (mtk00303)
*
*==============================================================================
*           HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* $Revision:   1.1  $
* $Modtime:   Aug 13 2002 14:49:06  $
* $Log:   //mtkvs01/vmdata/meta_lab/archives/META_error_handler.cpp-arc  $
 * 
 *    Rev 1.1   Sep 04 2002 16:29:56   mtk00303
 * checkin in new version
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#include <windows.h>
#pragma hdrstop

#include "meta.h"
#include "meta_msg.h"

   extern HANDLE hForm_PostMsgTarget;

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// modified by Andy Ueng
//void error_handler(META_ERR_CODE m_err)
void error_handler(META_CNF_ERR_CODE m_err)
// end of modified
{
    switch(m_err)
    {
        case META_FRAME_ERROR:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_ERROR_FRAME_ERROR,
                     0,
                     0
                   );
      		break;
        case META_NO_CALLBACK:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_ERROR_NO_CALLBACK,
                     0,
                     0
                   );
      		break;
        case META_PRIMITIVE_ERROR:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_ERROR_PRIMITIVE_ERROR,
                     0,
                     0
                   );
      		break;
        default:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_ERROR_UNDEFINE_ERROR,
                     0,
                     0
                   );
		break;
    } // switch
}
//----------------------------------------------------------------------
void META_result_handler(META_RESULT mr)
{
    switch(mr)
    {
        // META DLL functions return value
        case META_SUCCESS:
              // do nothing
             break;
        case META_FAILED:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_FAILED,
                     0,
                     0
                   );
             break;
        case META_COMM_FAIL:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_COMM_FAIL,
                     0,
                     0
                   );
             break;
        case META_NORESPONSE:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_NORESPONSE,
                     0,
                     0
                   );
             break;
        case META_BUFFER_LEN:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_BUFFER_LEN,
                     0,
                     0
                   );
             break;
        case META_GROUP_INVALID:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_GROUP_INVALID,
                     0,
                     0
                   );
             break;
        case META_ELEMENT_INVALID:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_ELEMENT_INVALID,
                     0,
                     0
                   );
             break;
        case META_FIELD_INVALID:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_FIELD_INVALID,
                     0,
                     0
                   );
             break;
        case META_VALUE_LEN:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_VALUE_LEN,
                     0,
                     0
                   );
             break;
        case META_VM_NOENTRY:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_VM_NOENTRY,
                     0,
                     0
                   );
             break;
        case META_VM_BUFFERFULL:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_VM_BUFFERFULL,
                     0,
                     0
                   );
             break;
        case META_VM_BADENTRY:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_VM_BADENTRY,
                     0,
                     0
                   );
             break;
        case META_VM_FAIL:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_VM_FAIL,
                     0,
                     0
                   );
             break;
        case META_FILE_BAD:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_FILE_BAD,
                     0,
                     0
                   );
             break;
        case META_PARAM_INVALID:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_PARAM_INVALID,
                     0,
                     0
                   );
             break;
        //---------------------------------------------------------
        default:
                PostMessage(
                     hForm_PostMsgTarget,
                     WM_META_DLL_ERROR_UNDEFINE_ERROR,
                     0,
                     0
                   );
		break;
    } // switch
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -