how to config a comserver in a customize dll?

Discussion in 'Python' started by ÒÊÃÉɽÈË, May 20, 2005.

  1. When i use the below code to create a comserver on Windows OS£¬i find that
    the com was configed in the file
    python23com.dll,why? if i want to config it in my customize dll,how should i
    do? thks

    class TestPythonCom:
    _public_methods_ = [ 'SplitString' ]
    _reg_progid_ = "TestPythonCom.Application"
    # NEVER copy the following ID
    # Use "print pythoncom.CreateGuid()" to make a new one.
    _reg_clsid_ = "{93D78ABA-1F6C-4B1C-97C7-C3700511415A}"

    def SplitString(self, val):
    return val
     
    ÒÊÃÉɽÈË, May 20, 2005
    #1
    1. Advertising

  2. ÒÊÃÉɽÈË

    Roger Upole Guest

    If you have a custom COM dll, you should just register it as normal.
    I'm not sure why you would want to register it as a python COM
    server. Unless you've duplicated the whole framework that allows
    com servers to be written in python ?

    Roger


    "ÒÊÃÉɽÈË" <> wrote in message
    news:...
    > When i use the below code to create a comserver on Windows OS£¬i find that
    > the com was configed in the file
    > python23com.dll,why? if i want to config it in my customize dll,how should
    > i
    > do? thks
    >
    > class TestPythonCom:
    > _public_methods_ = [ 'SplitString' ]
    > _reg_progid_ = "TestPythonCom.Application"
    > # NEVER copy the following ID
    > # Use "print pythoncom.CreateGuid()" to make a new one.
    > _reg_clsid_ = "{93D78ABA-1F6C-4B1C-97C7-C3700511415A}"
    >
    > def SplitString(self, val):
    > return val
    >
    >
    >




    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    Roger Upole, May 21, 2005
    #2
    1. Advertising

  3. ÒÊÃÉɽÈË

    Tim Roberts Guest

    "ÒÊÃÉɽÈË" <> wrote:

    >When i use the below code to create a comserver on Windows OS£¬i find that
    >the com was configed in the file
    >python23com.dll,why? if i want to config it in my customize dll,how should i
    >do?


    Python is not a compiled language. It does not produce DLLs. The real
    executable code for a Python COM server is always contained in
    python23com.dll. The registry will tell the interpreter that is called by
    python23com.dll where it can find your script.

    >class TestPythonCom:
    > _public_methods_ = [ 'SplitString' ]
    > _reg_progid_ = "TestPythonCom.Application"
    > # NEVER copy the following ID
    > # Use "print pythoncom.CreateGuid()" to make a new one.
    > _reg_clsid_ = "{93D78ABA-1F6C-4B1C-97C7-C3700511415A}"
    >
    > def SplitString(self, val):
    > return val


    --
    - Tim Roberts,
    Providenza & Boekelheide, Inc.
     
    Tim Roberts, May 23, 2005
    #3
  4. ÒÊÃÉɽÈË

    Giles Brown Guest

    But just to muddy the waters, using py2exe you can package your COM
    server as a .dll in its own right.

    Cheers,
    Giles Brown
     
    Giles Brown, May 23, 2005
    #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. Bill Smarty
    Replies:
    0
    Views:
    518
    Bill Smarty
    Jan 13, 2004
  2. Anushi
    Replies:
    5
    Views:
    8,998
  3. CSharpner
    Replies:
    0
    Views:
    1,133
    CSharpner
    Apr 9, 2007
  4. Ken Fine
    Replies:
    3
    Views:
    415
    Steven Cheng[MSFT]
    Aug 27, 2007
  5. H. Simpson
    Replies:
    4
    Views:
    342
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page