zoukankan      html  css  js  c++  java
  • showErrorInfo

    void showErrorInfo(UINT nErrCode, UINT nLine, LPCTSTR lpFuncName, UINT nType);
    
    /**************************************************************** 
    // FunctionName    :    showErrorInfo
    // Function        :    显示错误信息
    // Parameter       :   nErrCode    :错误码
                           nLine      :__LINE__    
                           lpFuncName     :函数名称
                           nType          :该参数控制错误信息显示方式
    
    // Author      :    Lthis
    // Create          :    2015-3-23 21:09:34 
    // Checked         :    Lthis 2015-3-23 
    ****************************************************************/
    
    void CLoadNtDriver::showErrorInfo(UINT nErrCode, UINT nLine, LPCTSTR lpFuncName, UINT nType){
        LPTSTR lpMsgBuf = NULL;
        TCHAR szMessage[256] = { 0 };
        TCHAR szCaption[32]  = { 0 };
    
        FormatMessage(0x1300, NULL, nErrCode, 0x400, (LPTSTR)&lpMsgBuf, 64, NULL);
        StringCchPrintf(szMessage, 256, _T("Error code:0x%X:%s
    "), nErrCode, lpMsgBuf);
        StringCchPrintf(szCaption, 32, _T("%s (Error Line:%d)"), lpFuncName, nLine);
        StringCchCat(szMessage, 256+32+1, szCaption);
    
        switch (nType)
        {
        case 0:
            OutputDebugString(szMessage);
            break;
        case 1:
            MessageBox(NULL, szMessage, szCaption, 0);
            break;
        default:
            break;
        }
    }

    ......

  • 相关阅读:
    android git问题File not found: git.exe
    asp.net 连接数据库的问题总结
    asp.net记账本
    asp.net对数据库增删改操作
    asp.net 连接数据库操作
    第九、十周周记
    作业四-兴趣问题清单
    价值观作业
    第七周周记
    第三次作业问卷调查
  • 原文地址:https://www.cnblogs.com/Lthis/p/4361037.html
Copyright © 2011-2022 走看看