The problem is, what I'm already encountered every time I worked with C code sections in CE - for some reason CE prefers to use "ntoskrnl' over "ucrtbase" for functions like "memset", "memove", etc.
I already had to deal with it in the pervious cheat in this way:
Code: Select all
{$c}
#define NO_OLDNAMES
#include <windows.h>
typedef HWND(WINAPI *GETFOREGROUNDWINDOW)(void);
GETFOREGROUNDWINDOW pfnGetForegroundWindow;
{$asm}
{$ccode}
HMODULE hModuleUser32 = LoadLibrary("User32.dll");
pfnGetForegroundWindow = (GETFOREGROUNDWINDOW)GetProcAddress(hModuleUser32, "GetForegroundWindow");
{$asm}
I also tried:
Code: Select all
extern __declspec(dllimport) HWND __stdcall GetForegroundWindow();
Code: Select all
extern __declspec(dllimport) SHORT __stdcall GetKeyState();
As an example, this is the previous cheat I made for the game "Exanima" x64 version:
[Link]
And now, when I'm dealing with matrixes, compiler automatically uses memset's and memmove's and I can't control where it gets them from.
So the main question is - how to deal with imports in a proper way?