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

📄 wdc_err.h

📁 WinDriver目录下的源码
💻 H
字号:
#ifndef _WDC_ERR_H_
#define _WDC_ERR_H_

/****************************************************************
*  File: wdc_err.h - WD card (WDC) internal error handling API  *
*        (for use only by the WDC library)                      *
*                                                               *
*  Copyright (c) 2005 Jungo Ltd.  http://www.jungo.com          *
*****************************************************************/

#if !defined (__KERNEL__)
    #include <stdio.h>
#else
    #include "kpstdlib.h"
#endif
#include <stdarg.h>
#include "utils.h"
#include "wdc_lib.h"

/*************************************************************
  Static inline functions implementations
 **************************************************************/
/* -----------------------------------------------
    Debugging and error handling
   ----------------------------------------------- */
void WdcSetLastErrStr(const CHAR *format, ...);
const CHAR *WdcGetLastErrStr(void);

/* [Additional error handling function prototypes are declared in wdc_lib.h] */

/* -----------------------------------------------
    Variables validation
   ----------------------------------------------- */
static inline BOOL WdcIsValidPtr(PVOID ptr, const CHAR *sErrMssg)
{
    if (!ptr)
    {
        WdcSetLastErrStr("Error - %s\n", sErrMssg);
        return FALSE;
    }

    return TRUE;
}

static inline BOOL WdcIsValidDevHandle(WDC_DEVICE_HANDLE hDev)
{
    return WdcIsValidPtr(hDev, "Invalid device handle");
}

#endif

⌨️ 快捷键说明

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