Embeding Python, COM crash

Discussion in 'Python' started by Fabien SK, Jul 30, 2003.

  1. Fabien SK

    Fabien SK Guest

    Hi,

    I wrote a plugin for Visual C++ 6 that uses Python 2.2 (it worked
    perfectly for months). I just installed Python 2.3, and recompiled my
    plugin, and now it crashes. My plugin do the following things:

    Py_Initialize();
    LoadLibrary("pythoncom23.dll");

    typedef PyObject* (*CONVERT_PROC)(IUnknown *punk, REFIID riid, BOOL
    bAddRef);
    CONVERT_PROC proc = 0;
    proc = (CONVERT_PROC)::GetProcAddress(m_hDll, "PyCom_PyObjectFromIUnknown");

    PyObject *pvc = proc(punk, __uuidof(IUnknown), FALSE); // boom

    and I have a "null pointer" crash with python 2.3. I remove the
    installation of 2.2, so there are no old header or library. I am using
    Visual C++ 6.
    Am I doing something wrong, or did something change with Python 2.3 ?
    Note: I am using the lastest python installer and win32all-155.exe.

    Thank you for your attention

    Fabien
     
    Fabien SK, Jul 30, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vardhman Jain

    query regarding embeding python in C

    Vardhman Jain, Apr 7, 2004, in forum: Python
    Replies:
    1
    Views:
    327
    Rick L. Ratzel
    Apr 8, 2004
  2. kiokju

    Python embeding error!!

    kiokju, Jan 18, 2006, in forum: Python
    Replies:
    0
    Views:
    273
    kiokju
    Jan 18, 2006
  3. mani
    Replies:
    0
    Views:
    303
  4. mani
    Replies:
    1
    Views:
    465
  5. Hongtian

    How to debug embeding Python?

    Hongtian, Dec 30, 2008, in forum: Python
    Replies:
    4
    Views:
    335
    Hongtian
    Jan 1, 2009
Loading...

Share This Page