how to config a comserver in a customize dll?

Ò

ÒÊÃÉɽÈË

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
 
R

Roger Upole

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


ÒÊÃÉɽÈË said:
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
 
T

Tim Roberts

ÒÊÃÉɽÈË said:
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
 
G

Giles Brown

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

Cheers,
Giles Brown
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top