470,594 Members | 1,375 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

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

Jul 19 '05 #1
3 1221
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
"沂蒙山人" <dr************@163.com> wrote in message
news:ma*************************************@pytho n.org...
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 =----
Jul 19 '05 #2
"沂蒙山人" <dr************@163.com> 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, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 19 '05 #3
But just to muddy the waters, using py2exe you can package your COM
server as a .dll in its own right.

Cheers,
Giles Brown

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.