Skip to content

Commit

Permalink
Merge pull request #21 from tmr232/ida6.9
Browse files Browse the repository at this point in the history
IDA 6.9 Support
  • Loading branch information
james91b committed Dec 1, 2015
2 parents b36d5d5 + bf34b57 commit 86d9e02
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ipythonEmbed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
static const char IPYTHON_EMBED_MODULE[] = "ipythonEmbed";
static const char IPYTHON_EMBED_START_METHOD_NAME[] = "start";
static const char IPYTHON_EMBED_START_QTCONSOLE_METHOD_NAME[] = "start_qtconsole";
static const char QT_MODULE_NAME[] = "qtcore4.dll";
static const char QT4_MODULE_NAME[] = "QtCore4.dll";
static const char QT5_MODULE_NAME[] = "Qt5Core.dll";
static const char EVENT_LOOP_FUNC_NAME[] = "?processEvents@QEventDispatcherWin32@QT@@UAE_NV?$QFlags@W4ProcessEventsFlag@QEventLoop@QT@@@2@@Z";

static PyObject* kernel_do_one_iteration = NULL;
Expand Down Expand Up @@ -88,7 +89,12 @@ void ipython_embed_iteration()

FARPROC eventloop_address()
{
HMODULE qtmodule = GetModuleHandleA(QT_MODULE_NAME);
HMODULE qtmodule = GetModuleHandleA(QT4_MODULE_NAME);

if (NULL == qtmodule) {
qtmodule = GetModuleHandleA(QT5_MODULE_NAME);
}

FARPROC src = GetProcAddress(qtmodule, EVENT_LOOP_FUNC_NAME);
return src;
}
Expand Down

0 comments on commit 86d9e02

Please sign in to comment.