Help File:2 ptOnDebugEvent

From Cheat Engine
Revision as of 10:21, 30 July 2021 by LeFiXER (talk | contribs) (Created page with "==ptOnDebugEvent== With this PluginType you will be notified whenever a debug event happens in the default windows debugger. Your callback routine will be called right afte...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ptOnDebugEvent[edit]

With this PluginType you will be notified whenever a debug event happens in the default windows debugger. Your callback routine will be called right after the WaitForDebugEvent returns true with the pointer to the DebugEvent structure.

Callback Definition

typedef int ( __stdcall *CEP_PLUGINTYPE2)(LPDEBUG_EVENT DebugEvent);

Return 0 if you want to let Cheat Engine, or other plugins, handle the debug event as well. Return 1 if you don't want anything else to handle this event. You will have to call ContinueDebugEvent yourself.

Pointer to structure of init you have to pass

struct PLUGINTYPE2_INIT
{
  CEP_PLUGINTYPE2 callbackroutine; //pointer to a callback routine of the type 2 plugin
};

NOTE: This event happens in a thread that is NOT the main thread. GUI specific calls (like ShowMessage) will not work properly.