This topic has not yet been rated - Rate this topic

RtlLookupFunctionEntry function

Applies to: desktop apps | Metro style apps

Searches the active function tables for an entry that corresponds to the specified PC value.

Syntax

PVOID WINAPI RtlLookupFunctionEntry(
  __in   ULONGLONG ControlPC,
  __out  PULONGLONG ImageBase,
  __out  PULONGLONG TargetGp
);

Parameters

ControlPC [in]

The virtual address of an instruction bundle within the function.

ImageBase [out]

The base address of module to which the function belongs.

TargetGp [out]

The global pointer value of the module.

This parameter has a different declaration on x64 systems. For more information, see x64 Definition.

Return value

If there is no entry in the function table for the specified PC, the function returns NULL. Otherwise, the function returns the address of the function table entry that corresponds to the specified PC.

x64 Definition

This function is declared as follows:

PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry (
    IN ULONG64 ControlPc,
    OUT PULONG64 ImageBase,
    IN OUT PUNWIND_HISTORY_TABLE HistoryTable OPTIONAL
    );

#define UNWIND_HISTORY_TABLE_SIZE 12

typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
        ULONG64 ImageBase;
        PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;

#define UNWIND_HISTORY_TABLE_NONE 0
#define UNWIND_HISTORY_TABLE_GLOBAL 1
#define UNWIND_HISTORY_TABLE_LOCAL 2

typedef struct _UNWIND_HISTORY_TABLE {
        ULONG Count;
        UCHAR Search;
        ULONG64 LowAddress;
        ULONG64 HighAddress;
        UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;

Requirements

Product

Windows XP Professional x64 Edition or 64-bit editions of Windows Server 2003

Header

WinNT.h

Library

Kernel32.lib

DLL

Kernel32.dll

See also

RtlUnwindEx
RtlVirtualUnwind

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
rtllookup
PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry (
    IN ULONG64 ControlPc,
    OUT PULONG64 ImageBase,
    IN OUT PUNWIND_HISTORY_TABLE HistoryTable OPTIONAL
    );

#define UNWIND_HISTORY_TABLE_SIZE 12

typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
        ULONG64 ImageBase;
        PRUNTIME_FUNCTION FunctionEntry;
} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;

#define UNWIND_HISTORY_TABLE_NONE 0
#define UNWIND_HISTORY_TABLE_GLOBAL 1
#define UNWIND_HISTORY_TABLE_LOCAL 2

typedef struct _UNWIND_HISTORY_TABLE {
        ULONG Count;
        UCHAR Search;
        ULONG64 LowAddress;
        ULONG64 HighAddress;
        UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
rtl
PVOID WINAPI RtlLookupFunctionEntry(
  __in   ULONGLONG ControlPC,
  __out  PULONGLONG ImageBase,
  __out  PULONGLONG TargetGp
);