Compartilhar via


pfnCallRing0Function (Compact 2013)

10/16/2014

Calls an OEM adaptation layer (OAL) function that must be run in ring zero.

Syntax

int (*pfnCallRing0Function)(
    FARPROC pfn,
    DWORD arg0,
    DWORD arg1,
    DWORD arg2
);

Parameters

  • pfn
    Pointer to the OEM-implemented OAL function to call in ring zero. The signature of this function can take up to three parameters and must return an integer value.
  • arg0
    The first parameter to the function pointed to by pfn. It can contain any data that is sizeof(DWORD). Pass 0 if the argument is unused.
  • arg1
    The second parameter to the function pointed to by pfn. It can contain any data that is sizeof(DWORD). Pass 0 if the argument is unused.
  • arg2
    The third parameter to the function pointed to by pfn. It can contain any data that is sizeof(DWORD). Pass 0 if the argument is unused.

Return Value

The return value is specific to the implementation of the function specified in pfn.

Remarks

This function is available only to the OEM adaptation layer (OAL). It cannot be called by application code. The pfnCallRing0Function member of NKGLOBAL points to this function.

On x86-based computers, OEM adaptation layer (OAL) code runs in ring one. An example of code that must be run in ring zero is code that flushes the translation lookaside buffer (TLB). To call the OAL function that you write to clear the TLB, use pfnCallRing0Function to run it in ring zero.

Requirements

Library

Nkstub.lib

See Also

Reference

Kernel Functions Available to the OAL
NKGLOBAL