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. Advertisements

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. Guest

    embeding wmp w/instant play?l

    Guest, Jun 10, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    529
    Curt_C [MVP]
    Jun 10, 2005
  2. =?Utf-8?B?UGlja3dpY2tCb2Iz?=

    Embeding Directx in aspx page?

    =?Utf-8?B?UGlja3dpY2tCb2Iz?=, Nov 30, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    481
    =?Utf-8?B?U2l2YSBN?=
    Dec 1, 2005
  3. Adrienne

    Re: Font Embeding

    Adrienne, Jul 22, 2003, in forum: HTML
    Replies:
    3
    Views:
    502
    Robot Tree
    Jul 22, 2003
  4. Vardhman Jain

    query regarding embeding python in C

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

    Python embeding error!!

    kiokju, Jan 18, 2006, in forum: Python
    Replies:
    0
    Views:
    345
    kiokju
    Jan 18, 2006
  6. mani
    Replies:
    0
    Views:
    437
  7. mani
    Replies:
    1
    Views:
    562
  8. Hongtian

    How to debug embeding Python?

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