win32k!RipOutput函数分析之win32k!PrintAndPrompt函数的最后一个参数的作用

win32k!RipOutput函数分析之win32k!PrintAndPrompt函数的最后一个参数的作用

ULONG RipOutput(
    ULONG idErr,
    ULONG flags,
    LPSTR pszFile,
    int iLine,
    LPSTR pszFunction,
    LPSTR pszErr,
    PEXCEPTION_POINTERS pexi)
{
    static CONST struct {
        LPSTR szLevel;
        DWORD dwPrint;
        DWORD dwPrompt;
    } aLevel[] = {
        “?”,        0,                      0,
        “Err”,      RIPF_PRINTONERROR,      RIPF_PROMPTONERROR,
        “Wrn”,      RIPF_PRINTONWARNING,    RIPF_PROMPTONWARNING,
        “Vrbs”,     RIPF_PRINTONVERBOSE,    RIPF_PROMPTONVERBOSE,
    };

    int iLevel;

    DebugAssertion(flags & RIP_LEVELBITS);
    iLevel = ((flags & RIP_LEVELBITS) >> RIP_LEVELBITSSHIFT);
    DebugAssertion(!(flags & RIP_USERTAGBITS));

    return PrintAndPrompt(
            TEST_RIPF(aLevel[iLevel].dwPrint),
            TEST_RIPF(aLevel[iLevel].dwPrompt),
            idErr,
            flags,
            aLevel[iLevel].szLevel,
            pszFile,
            iLine,
            pszFunction,
            pszErr,
            pexi);
}

D:srv03rtmwindowscore/w32inc/w32err.h:871:#define TEST_RIPF(f)    TEST_BOOL_FLAG(GetRipFlags(), f)

DWORD GetRipFlags(
    VOID)
{
    return (gpsi != NULL ? gpsi->dwRIPFlags : RIPF_DEFAULT);
}

0: kd> x win32k!gpsi
bfa70698          win32k!gpsi = 0xbc610c9c
0: kd> dx -id 0,0,ffffffff8964d538 -r1 ((win32k!tagSERVERINFO *)0xbc610c9c)
((win32k!tagSERVERINFO *)0xbc610c9c)                 : 0xbc610c9c [Type: tagSERVERINFO *]
    [+0x000] dwSRVIFlags      : 0x101 [Type: unsigned long]
    [+0x004] cHandleEntries   : 0x100 [Type: unsigned long]
    [+0x008] mpFnidPfn        [Type: long (* [32])(tagWND *,unsigned int,unsigned int,long,unsigned long)]
    [+0x088] aStoCidPfn       [Type: long (* [7])(tagWND *,unsigned int,unsigned int,long)]
    [+0x0a4] mpFnid_serverCBWndProc [Type: unsigned short [31]]
    [+0x0e4] apfnClientA      [Type: _PFNCLIENT]
    [+0x13c] apfnClientW      [Type: _PFNCLIENT]
    [+0x194] apfnClientWorker [Type: _PFNCLIENTWORKER]
    [+0x1b8] cbHandleTable    : 0x1000 [Type: unsigned long]
    [+0x1bc] atomSysClass     [Type: unsigned short [23]]
    [+0x1ec] dwDefaultHeapBase : 0x0 [Type: unsigned long]
    [+0x1f0] dwDefaultHeapSize : 0x300000 [Type: unsigned long]
    [+0x1f4] uiShellMsg       : 0xc02a [Type: unsigned int]
    [+0x1f8] wMaxBtnSize      : 0x4b [Type: unsigned int]
    [+0x1fc] MBStrings        [Type: tagMBSTRING [11]]
    [+0x3b4] atomIconSmProp   : 0xc028 [Type: unsigned short]
    [+0x3b6] atomIconProp     : 0xc029 [Type: unsigned short]
    [+0x3b8] atomContextHelpIdProp : 0xc027 [Type: unsigned short]
    [+0x3ba] acOemToAnsi      : “” [Type: char [256]]
    [+0x4ba] acAnsiToOem      : “” [Type: char [256]]
    [+0x5bc] dwInstalledEventHooks : 0x0 [Type: unsigned long]
    [+0x5c0] aiSysMet         [Type: int [88]]
    [+0x720] argbSystemUnmatched [Type: unsigned long [31]]
    [+0x79c] argbSystem       [Type: unsigned long [31]]
    [+0x818] ahbrSystem       [Type: HBRUSH__ * [31]]
    [+0x894] hbrGray          : 0x1100078 [Type: HBRUSH__ *]
    [+0x898] ptCursor         : {x=786 y=14} [Type: tagPOINT]
    [+0x8a0] dwLastRITEventTickCount : 0xffcaa0fa [Type: unsigned long]
    [+0x8a4] nEvents          : 0 [Type: int]
    [+0x8a8] gclBorder        : 1 [Type: int]
    [+0x8ac] dtScroll         : 0x190 [Type: unsigned int]
    [+0x8b0] dtLBSearch       : 0x7d0 [Type: unsigned int]
    [+0x8b4] dtCaretBlink     : 0x212 [Type: unsigned int]
    [+0x8b8] ucWheelScrollLines : 0x3 [Type: unsigned int]
    [+0x8bc] wMaxLeftOverlapChars : 3 [Type: int]
    [+0x8c0] wMaxRightOverlapChars : 3 [Type: int]
    [+0x8c4] cxSysFontChar    : 8 [Type: int]
    [+0x8c8] cySysFontChar    : 16 [Type: int]
    [+0x8cc] cxMsgFontChar    : 6 [Type: int]
    [+0x8d0] cyMsgFontChar    : 13 [Type: int]
    [+0x8d4] tmSysFont        [Type: tagTEXTMETRICW]
    [+0x910] hIconSmWindows   : 0x10025 [Type: HICON__ *]
    [+0x914] hIcoWindows      : 0x10031 [Type: HICON__ *]
    [+0x918] hCaptionFont     : 0x130a0148 [Type: HFONT__ *]
    [+0x91c] hMsgFont         : 0x30a0100 [Type: HFONT__ *]
    [+0x920] dwKeyCache       : 0x4b [Type: unsigned long]
    [+0x924] dwAsyncKeyCache  : 0x25 [Type: unsigned long]
    [+0x928] cCaptures        : 0x0 [Type: unsigned long]
    [+0x92c] oembmi           [Type: tagOEMBITMAPINFO [93]]
    [+0xefc] rcScreen         : {LT(0, 0) RB(800, 600)  [800 x 600]} [Type: tagRECT]
    [+0xf0c] BitCount         : 0x20 [Type: unsigned short]
    [+0xf0e] dmLogPixels      : 0x60 [Type: unsigned short]
    [+0xf10] Planes           : 0x1 [Type: unsigned char]
    [+0xf11] BitsPixel        : 0x20 [Type: unsigned char]
    [+0xf14] PUSIFlags        : 0x80000020 [Type: unsigned long]
    [+0xf18] uCaretWidth      : 0x1 [Type: unsigned int]
    [+0xf1c] UILangID         : 0x409 [Type: unsigned short]
    [+0xf20] dwLastSystemRITEventTickCountUpdate : 0xffca9c47 [Type: unsigned long]
    [+0xf24] adwDBGTAGFlags   [Type: unsigned long [25]]
    [+0xf88] dwTagCount       : 0x17 [Type: unsigned long]
    [+0xf8c] dwRIPFlags       : 0x75 [Type: unsigned long]
0: kd> ed 0xbc610c9c++0xf8c 0x31

© 版权声明

相关文章

暂无评论

none
暂无评论...