The simplest explaination is that ActiveX EXE and DLL files include a special interface called IUnknown. This provides a way for the operating system to allow other programs to talk to them directly without spcifically building the connections needed into the program that talks to them. In other words, ActiveX provides a swiss army knife of connections that will let any program use an EXE or DLL, as long as the tool actually exists in the EXE or DLL you try to talk to.
A normal EXE can use such ActiveX objects, but not respond to them. In other words, you can open a database and change things in it, which requires only that you tell the database to do something, but you would need to wait for a response, since your program can only see the direct result of a command, not respond to things the EXE or DLL does. An example would be something like POV-Ray, that produces 3D images. You could send POV-Ray a file, but you would then have to wait 4-5 minutes for it to finish. If it and your program where both ActiveX, then you could send it the file, it would start doing its thing and you could continue to do other things in your program while waiting for POV-Ray to tell you that it was done. Also, as far as other programs are concerned, there is no difference between an ActiveX DLL and an ActiveX EXE. Many will work as both, either running as a real program or 'inside' something else when you talk to them through ActiveX. This of course requires making them to do so, but an example it Windows Media Player. You can open the player on your computer as an EXE or when in a browser, it will simply play the movie you download inside the browser window. The same ActiveX EXE does both, but one version simply loads itsef, plays the movie and vanishes when no longer needed.
A normal DLL is 'hard linked' into the program that uses it. In other words, rather than being able to ask IUnknown if the DLL can do something, the assumption is you already know exactly what it does and when you create your program the compiler simply raplaces any reference to commands in that DLL with a command to run that specific part of the it. Its like filling a hole with cement. It fits perfectly into 'your' program, but for someone else to use it they would need to make an identical hole in their program. Such a DLL can be used to connect two programs together, and POV-Ray, which I mentioned before, and a design program called Moray use such. This kind of DLL is faster to respond, because IUnknown require Windows to get involved with making sure everything works. However, the advantage is that if you add or change something in the ActiveX DLL, your program doesn't care, it simply asks if the thing it wants to do exists and if so uses it. With a normal DLL you have to specifically describe every single command you plan to use to your program, before it can do anything.
Now this difference may not seem like much, but it means that to use a button, like you see in numerous programs, all I need to know is what that object is called and that I need to add, for instance, something like 'dim Button1 as Button' and 'sub OnButton1.Click()...' to my program to use it. Windows deals with all the dirty issues of making sure that such an object exists and handing a copy over for my use when I need it. For a normal DLL, I would be responsible for making sure it exists, making sure my program knew how to use it, making sure it acted like a button and making sure that all of them got cleaned up when I no longer needed them. Ugh!
What all this means in relation to Mushclient is that Mushclient 'is' and ActiveX EXE. Scripts can call DLLs and EXEs that use ActiveX, so you can build a second ActiveX DLL or EXE that can talk to Mushclient's ActiveX interface:
Mushclient --> Script
^ /
| /
| |/_
You Program
This is more round about than normal, but is basically the same way Internet Explorer uses it, though it is rarely used, since only Internet Explorer supports it. Since ActiveX doesn't exist on Mac, Linux, OS/2 or literally anything other than Windows, web browser makers told Microsoft to stuff this feature of IE someplace uncomfortable. ;) lol Most programs that use it do this:
Your Program <------> ActiveX EXE or DLL |