Want to create an ActiveX object from a Python class

S

Shi Sherebrin

A colleague wants some functionality that I've built in a Python class
available to 'drop' into her Visual C++ project. Some time ago she
gave up on trying to use 'regular' COM servers, since ActiveX controls
integrate so much more easily. So if I can't wrap the Python class
into an ActiveX object, I'll have to port it.

I've been searching through the pythoncom and ctypes documentation and
samples, and can't seem to find any examples of making an ActiveX
object. The pythoncom documentation claims that ActiveX is the same
as COM, but there seems to need to be more added to a COM server to
make it an ActiveX object, and I don't know nearly enough to know how
to do this.

Is anyone else interested in doing this, and has anyone managed to do
so?

thanks,
Shi.
 
J

John J. Lee

I've been searching through the pythoncom and ctypes documentation and
samples, and can't seem to find any examples of making an ActiveX
object. The pythoncom documentation claims that ActiveX is the same
as COM, but there seems to need to be more added to a COM server to
make it an ActiveX object, and I don't know nearly enough to know how
to do this.

Is anyone else interested in doing this, and has anyone managed to do
so?

ActiveX controls are indeed just COM servers with particular interfaces.

Have you found the O'Reilly book yet (Hammond and Robinson)? I don't
remember anything specifically on ActiveX, but it certainly covers
making COM servers from Python. The relevant chapter (12) is actually
downloadable for free, I think.

I don't know whether AX controls are possible / well-supported:

http://tinyurl.com/fo58


but this might be more useful to you:

http://tinyurl.com/fo5t
http://tinyurl.com/fo6b


John
 
S

Syver Enstad

A colleague wants some functionality that I've built in a Python class
available to 'drop' into her Visual C++ project. Some time ago she
gave up on trying to use 'regular' COM servers, since ActiveX controls
integrate so much more easily. So if I can't wrap the Python class
into an ActiveX object, I'll have to port it.

I've been searching through the pythoncom and ctypes documentation and
samples, and can't seem to find any examples of making an ActiveX
object. The pythoncom documentation claims that ActiveX is the same
as COM, but there seems to need to be more added to a COM server to
make it an ActiveX object, and I don't know nearly enough to know how
to do this.

Is anyone else interested in doing this, and has anyone managed to do
so?

If I am not mistaken, the only thing your colleague needs is a type
library for the python com object. In the cases I've experienced this
is what makes MS IDE's tick when it comes to COM objects.
 
N

News M Claveau /Hamster-P

Bonjour !
Peut-être en créant un serveur COM, puis en encapsulant celui-ci avec un peu
de code, dans VBCCE (=Visual Basic Control Creation Edition, gratuit, chez
Microsoft, pour faire des Active-X).
C'était juste une idée.


Hi ! (sorry for my poor english)
Perhaps with : to do an COM server, and use it, in little code, in VBCCE
(=Visual Basic Control Creation Edition ; free, at Microsoft, for create
Active-X).
Just an idea.


Url : http://msdn.microsoft.com/vbasic/downloads/tools/cce/default.aspx



@-salutations
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top