-
Notifications
You must be signed in to change notification settings - Fork 5
FindPattern
Scans the virtual address space for a byte pattern and returns the address of the first match.
UINT32 FindPattern(
UINT32 startAddr,
LPCSTR pattern,
UINT32 endAddr
);
startAddr
The address where to start searching. Pass 0 (zero) if you wish to process the entire address space. If you wish to find a match within a module, pass the HMODULE to the startAddr parameter. If you want to scan the currents process image, pass the return value of GetModuleHandleA( NULL ).
pattern
The pattern to search for. It is a ascii c string containing of space separated hex numbers. For example "12 34 FC 1F C3 A0 CC". Use questionmarks (?) to wildcard bytes. For example "12 34 ? 1F C3 ? CC".
endAddr
Do not search at addresses greater or equal to the endAddr. (endAddr is excluded). The search is stopped when reaching this address and FindPattern will return 0 (zero).
If a match has been found the address to the first byte of the match is returned. Otherwise 0 (zero) is returned.
none
Minimum API Level | 1 |
Target Edition | Any |
Header | S4ModApi.h |
Library | settlers4api.lib |
DLL | settlers4api.dll |