pythoncom.connect()

Discussion in 'Python' started by John J. Lee, Nov 21, 2003.

  1. John J. Lee

    John J. Lee Guest

    Dear,

    I have problems when I get the IDispatch with pythoncom.connect().
    When I called the 'Excel.Application' with it, it worked. (At least I can
    see the pythoncom.connect() is working for the well-designed COM like
    Excel.)
    When I called my COM module which was derived from IDispatch interface,
    the pythoncom.connect() issued error like
    com_error: (-2147221021, 'Operation unavailable', None, None).

    Was my COM module badly desinged? This COM worked well with VB.
    Is there anybody who solved this kind of problems?

    I alse tried using the gencache.EnsureModule() after I generate a static COM
    file with makepy.
    In this way, I got the member function not available errors.

    Thank you.

    - john
    John J. Lee, Nov 21, 2003
    #1
    1. Advertising

  2. John J. Lee

    John J. Lee Guest

    "John J. Lee" <> writes:

    Not another one! And there was I thinking my "J." made me safe from
    namespace clashes... :-(


    > I have problems when I get the IDispatch with pythoncom.connect().
    > When I called the 'Excel.Application' with it, it worked. (At least I can
    > see the pythoncom.connect() is working for the well-designed COM like
    > Excel.)
    > When I called my COM module which was derived from IDispatch interface,
    > the pythoncom.connect() issued error like
    > com_error: (-2147221021, 'Operation unavailable', None, None).

    [...]

    Do you know about win32com.client.Dispatch and friends? Why are you
    calling pythoncom.connect()?


    John
    John J. Lee, Nov 23, 2003
    #2
    1. Advertising

  3. John J. Lee

    Peter Hansen Guest

    "John J. Lee" wrote:
    >
    > "John J. Lee" <> writes:
    >
    > Not another one! And there was I thinking my "J." made me safe from
    > namespace clashes... :-(


    Better switch to the Java approach then, Mr. com.pobox.lee.j.john ...

    -Peter
    Peter Hansen, Nov 23, 2003
    #3
    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. Hannes Grund

    Pythoncom shutdown problems

    Hannes Grund, Jul 27, 2003, in forum: Python
    Replies:
    1
    Views:
    298
    Michael Porter
    Jul 27, 2003
  2. Marc ENGEL
    Replies:
    0
    Views:
    425
    Marc ENGEL
    Jul 30, 2003
  3. Fabien SK

    pythoncom + set property

    Fabien SK, Aug 22, 2003, in forum: Python
    Replies:
    0
    Views:
    312
    Fabien SK
    Aug 22, 2003
  4. Paul
    Replies:
    3
    Views:
    502
  5. Ashley

    PythonCOM help needed

    Ashley, Oct 22, 2003, in forum: Python
    Replies:
    0
    Views:
    358
    Ashley
    Oct 22, 2003
Loading...

Share This Page