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

📄 minip.h

📁 winddk src目录下的文件系统驱动源码压缩!
💻 H
字号:
/*++

Copyright (c) 1989 - 1999 Microsoft Corporation

Module Name:

    minip.h

Abstract:

    Macros and definitions private to the null mini driver.

Notes:

    This module has been built and tested only in UNICODE environment

--*/

#ifndef _NULLMINIP_H_
#define _NULLMINIP_H_

NTHALAPI
VOID
KeStallExecutionProcessor (
    IN ULONG MicroSeconds
    );

#ifndef min
#define min(a, b)       ((a) > (b) ? (b) : (a))
#endif

#if DBG

#ifdef SUPPRESS_WRAPPER_TRACE
#define RxTraceEnter(func)                                                  \
        PCHAR __pszFunction = func;                                         \
        BOOLEAN fEnable = FALSE;                                            \
        if( RxNextGlobalTraceSuppress ) {                                   \
            RxNextGlobalTraceSuppress = RxGlobalTraceSuppress = FALSE;      \
            fEnable = TRUE;                                                 \
        }                                                                   \
        RxDbgTrace(0,Dbg,("Entering %s\n",__pszFunction));

#define RxTraceLeave(status)                                                \
        if( fEnable ) {                                                     \
            RxNextGlobalTraceSuppress = RxGlobalTraceSuppress = TRUE;       \
        }                                                                   \
        RxDbgTrace(0,Dbg,("Leaving %s Status -> %08lx\n",__pszFunction,status));
#else
#define RxTraceEnter(func)                                                  \
        PCHAR __pszFunction = func;                                         \
        RxDbgTrace(0,Dbg,("Entering %s\n",__pszFunction));

#define RxTraceLeave(status)                                                \
        RxDbgTrace(0,Dbg,("Leaving %s Status -> %08lx\n",__pszFunction,status));
#endif

#else

#define RxTraceEnter(func)
#define RxTraceLeave(status)

#endif

#define RX_VERIFY( f )  if( (f) ) ; else ASSERT( 1==0 )

//
//  Set or Validate equal
//
#define SetOrValidate(x,y,f)                                \
        if( f ) (x) = (y); else ASSERT( (x) == (y) )
        
//
//  RXCONTEXT data - mini-rdr context stored for async completions
//  NOTE: sizeof this struct should be == MRX_CONTEXT_SIZE !!
//

typedef struct _NULMRX_COMPLETION_CONTEXT {
    //
    //  IoStatus.Information
    //
    ULONG       Information;

    //
    //  IoStatus.Status
    //
    NTSTATUS    Status;
    
    //
    //  Outstanding I/Os
    //
    ULONG       OutstandingIOs;

    //
    //  I/O type
    //
    ULONG       IoType;

} NULMRX_COMPLETION_CONTEXT, *PNULMRX_COMPLETION_CONTEXT;

#define IO_TYPE_SYNCHRONOUS     0x00000001
#define IO_TYPE_ASYNC           0x00000010

#define NulMRxGetMinirdrContext(pRxContext)     \
        ((PNULMRX_COMPLETION_CONTEXT)(&(pRxContext)->MRxContext[0]))

#endif // _NULLMINIP_H_


⌨️ 快捷键说明

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