I am going to develop a plugin mechanism. That is, provide an
component for 3rd party so that they could pluging their application
(.exe) into my application.
Is it possible the component is written in COM and any 3rd party
developer could use it no matter what programming language they use? I
am sure that C++ and VB could use the COM, but I'm not sure about
javascript and python.
And how could I do that to support all the language above, if
possible? Thanks for your answer in advance. Thank you.
It is true that many language implementations on Windows do support
COM, but I would guess COM is more of a realm for statically typed and
compiled languages. So, less common for scripting or interpreted
languages.
But it's doable.
For javascript/VBScript, there's a way (or at least, there __was__, at
the time Win2000 came out) to register *.js or *.vbs scripts as COM
servers. It is also possible to write COM servers in Python,and one
can google out tutorials on how to do that, but I would guess not many
Python people venture there.
For this to work, you would have to expose __automation-compatible__
plug-in interface (at least for Java/VBScript).
Goran.
MS-provided JavaScript engine (the one used by Internet Explorer and WScript) is COM based. It can consume COM objects directly (as long as they implement IDispatch), and every JavaScript object is a COM object. This is how the script on HTML page can manipulate ActiveX controls.
I'm not very familiar with Python, but if you search for "python COM", there are lots of hits.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925