GameFindAllOccurrencesOfPattern Method (String, IntPtr)RAGE Plugin Hook Documentation

[This is preliminary documentation and is subject to change.]

Finds all occurrences of the specified pattern of bytes in the game's memory.

Namespace: Rage
Assembly: RagePluginHook (in RagePluginHook.dll) Version: 0.0.0.0 (0.47.1037.9935)
Syntax

public static IntPtr[] FindAllOccurrencesOfPattern(
	string pattern,
	IntPtr startAddress
)

Parameters

pattern
Type: SystemString
The pattern to find. Wildcard ?? is supported.
startAddress
Type: SystemIntPtr
The address to start searching at. If Zero, search is started at the base address.

Return Value

Type: IntPtr
An IntPtr representing the memory location the pattern was found at, or Zero if the pattern wasn't found.
Remarks

The pattern should be in the following format:

XX XX XX XX XX XX XX XX XX XX

Where each XX is a hexadecimal value representing the byte, or ?? to indicate a wildcard.

eg. "77 37 E8 ?? ?? ?? ?? 84 C0"

All white space is ignored.

Even though the search algorithm is fast, you shouldn't be calling this every frame.

Ideally, you want to find all the patterns you need when your plugin initializes.

See Also

Reference