#include <windows.hpp> // For the HWND definition #include <kernwin.hpp> // For ui_get_hwnd, *vptr of callui_t has the result // We need to cast the result because vptr is a void pointer HWND hwnd = (HWND)callui(ui_get_hwnd).vptr; // If hwnd is NULL, we're running under the IDA text // version if (hwnd == NULL) error("Cannot run in the IDA text version!");