@@ -27,19 +27,6 @@ inline void *GetPythonOleProcAddress(const char *procName)
2727#endif
2828 hMod = GetModuleHandle (buf);
2929
30- // XXX It is unclear why the code previously tried to identify a loaded PythonCOM DLL of
31- // any Python version 1.5 .. 3.9. If some InprocServer would load the DLL of a different
32- // Python version that would likely cause a crash. Thus deactivated.
33- //
34- // for (int i = 0; hMod == NULL && i < 40; i++) {
35- // #ifdef _DEBUG
36- // wsprintf(buf, _T("PythonCOM3%d_d.dll"), i);
37- // #else
38- // wsprintf(buf, _T("PythonCOM3%d.dll"), i);
39- // #endif
40- // hMod = GetModuleHandle(buf);
41- // }
42-
4330 if (hMod) {
4431 void *rc = GetProcAddress (hMod, procName);
4532 if (rc == NULL )
@@ -82,8 +69,8 @@ BOOL Python_OnCmdMsg(CCmdTarget *obj, UINT nID, int nCode, void *pExtra, AFX_CMD
8269 pObj->pOleEventHookList ->Lookup ((unsigned short )pEvent->m_dispid , (void *&)method)) {
8370 if (pfnMakeOlePythonCall == NULL ) {
8471 pfnMakeOlePythonCall =
85- (BOOL (*)(PyObject *, DISPPARAMS FAR *, VARIANT FAR *, EXCEPINFO FAR *, UINT FAR *,
86- PyObject *))GetPythonOleProcAddress (" PyCom_MakeOlePythonCall" );
72+ (BOOL (*)(PyObject *, DISPPARAMS FAR *, VARIANT FAR *, EXCEPINFO FAR *, UINT FAR *,
73+ PyObject *))GetPythonOleProcAddress (" PyCom_MakeOlePythonCall" );
8774
8875 ASSERT (pfnMakeOlePythonCall);
8976 }
0 commit comments