COM server usage question

Discussion in 'Python' started by Propad, Aug 8, 2003.

  1. Propad

    Propad Guest

    Hello everybody,
    I created a simple COM server, by copy and paste of the first example
    from the book by Mark Hammond. I registered the server, and was able
    access its functionallity from another python script, and from Word.
    Then I tried accessing the server from another tool (which is my real
    task). The problem was, it was not in the dropdown list of servers
    usable by the tool. The alternative was to specify a position of the
    server, by giving in the location of a .exe or .dll or .tlb file.
    So after browsing my registry and this newsgroup for a (long) while,
    my conclusion is:
    -all com servers in the mentioned drop-down list are entries in the
    HKEY_CLASSES_ROOT\TypeLib registry entry
    -in order to get my server into that list, I have to somehow specify
    that before registration. My guess would be I need to somehow use the
    _reg_options_ attribute. But if, how?
    -as an alternative I could write an *.IDL file, compile it to *.tbl,
    and feed that into the calling tool. I've seen the example given at
    the c_types page. But how do I know what entries to put into the *.idl
    file? Meaning specifically the GUID-s. I'm sure theese are allready
    somewhere in the registry, so I can't just go and create new ones. Can
    the GUID-s for the type library, interface and implementig class be
    derived from the GUID I used when creating the server? And also, where
    do I get a working midl - compiler? I found two on my computer, but
    neither seems to be working, asking for a cl compiler.
    I thank you kindly for your help.
    Regards,
    Nenad Propadovic
     
    Propad, Aug 8, 2003
    #1
    1. Advertising

  2. Propad

    Mark Hammond Guest

    Propad wrote:

    > Hello everybody,
    > I created a simple COM server, by copy and paste of the first example
    > from the book by Mark Hammond. I registered the server, and was able
    > access its functionallity from another python script, and from Word.
    > Then I tried accessing the server from another tool (which is my real
    > task). The problem was, it was not in the dropdown list of servers
    > usable by the tool. The alternative was to specify a position of the
    > server, by giving in the location of a .exe or .dll or .tlb file.
    > So after browsing my registry and this newsgroup for a (long) while,
    > my conclusion is:
    > -all com servers in the mentioned drop-down list are entries in the
    > HKEY_CLASSES_ROOT\TypeLib registry entry
    > -in order to get my server into that list, I have to somehow specify
    > that before registration. My guess would be I need to somehow use the
    > _reg_options_ attribute. But if, how?
    > -as an alternative I could write an *.IDL file, compile it to *.tbl,
    > and feed that into the calling tool. I've seen the example given at
    > the c_types page. But how do I know what entries to put into the *.idl
    > file? Meaning specifically the GUID-s. I'm sure theese are allready
    > somewhere in the registry, so I can't just go and create new ones. Can
    > the GUID-s for the type library, interface and implementig class be
    > derived from the GUID I used when creating the server? And also, where
    > do I get a working midl - compiler? I found two on my computer, but
    > neither seems to be working, asking for a cl compiler.
    > I thank you kindly for your help.


    At this stage, PythonCOM servers do not create a type library. Thus,
    the interface is registered, but no tools that process type libraries
    will be able to see it.

    Mark.
     
    Mark Hammond, Aug 9, 2003
    #2
    1. Advertising

  3. Propad

    Propad Guest

    Dear Mr. Hammond,
    thank you for your answer, and even more for making Python on win32
    possible at all. I do realise my question resembles some previous
    postings, and the answer you gave me was allready given.
    However, I'll try to restate my question in other words: could anybody
    give me a pointer to any kind of literature enabling me to produce my
    own type library? Some easy to understand beginners guide to COM,
    explaining also the typical registry entries? Well if there are no
    tlb-s in win32com, I just might manage to get them in there :)
    Thanks, all you kind people.
    Nenad Propadovic
    P.S. Starting a contract work at BMW, I just realised the penetration
    of Python in the german automotive industry seems to be quite descent.
    This is due to a tool-suite by a company named DSpace, which uses
    Python as its scripting language...

    Mark Hammond <> wrote in message news:<bh1l4o$4gd$>...
    > Propad wrote:
    >
    > > Hello everybody,

    ....
    > > I thank you kindly for your help.

    >
    > At this stage, PythonCOM servers do not create a type library. Thus,
    > the interface is registered, but no tools that process type libraries
    > will be able to see it.
    >
    > Mark.
     
    Propad, Aug 9, 2003
    #3
  4. (Propad) wrote in message news:<>...
    > Dear Mr. Hammond,
    > thank you for your answer, and even more for making Python on win32
    > possible at all. I do realise my question resembles some previous
    > postings, and the answer you gave me was allready given.
    > However, I'll try to restate my question in other words: could anybody
    > give me a pointer to any kind of literature enabling me to produce my
    > own type library? Some easy to understand beginners guide to COM,
    > explaining also the typical registry entries? Well if there are no
    > tlb-s in win32com, I just might manage to get them in there :)
    > Thanks, all you kind people.
    > Nenad Propadovic
    > P.S. Starting a contract work at BMW, I just realised the penetration
    > of Python in the german automotive industry seems to be quite descent.
    > This is due to a tool-suite by a company named DSpace, which uses
    > Python as its scripting language...
    >


    "Inside COM+ Base Services" From MS Press is the first book you should
    read. It should probably be read by anyone trying to do serious COM
    work. There is at least one chapter on Type Libraries in the book.

    Once you get through that the library reference at
    http://msdn.microsoft.com should fill in the blanks.

    However, both of these references will assume you know C/C++
    reasonably well (and maybe some VB on msdn).
     
    logistix at cathoderaymission.net, Aug 10, 2003
    #4
    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. metfan
    Replies:
    2
    Views:
    4,855
    Robert Olofsson
    Oct 21, 2003
  2. Colin J. Williams

    Webchecker Usage - a problem with local usage

    Colin J. Williams, Feb 25, 2004, in forum: Python
    Replies:
    1
    Views:
    545
    Colin J. Williams
    Feb 26, 2004
  3. hvt
    Replies:
    0
    Views:
    1,215
  4. hvt
    Replies:
    0
    Views:
    1,487
  5. Krist
    Replies:
    8
    Views:
    6,526
    Arne Vajhøj
    Feb 10, 2010
Loading...

Share This Page