COM server usage question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Propad

    COM server usage question

    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_RO OT\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

    #2
    Re: COM server usage question

    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 <mhammond@skipp inet.com.au> wrote in message news:<bh1l4o$4g d$2@arachne.lab yrinth.net.au>. ..[color=blue]
    > Propad wrote:
    >[color=green]
    > > Hello everybody,[/color][/color]
    ....[color=blue][color=green]
    > > I thank you kindly for your help.[/color]
    >
    > 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.[/color]

    Comment

    • logistix at cathoderaymission.net

      #3
      Re: COM server usage question

      nenad.propadovi c@partner.bmw.d e (Propad) wrote in message news:<da85836e. 0308091359.38d0 cccf@posting.go ogle.com>...[color=blue]
      > 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...
      >[/color]

      "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).

      Comment

      Working...