devxlogo

ActiveX EXE vs. DLL

ActiveX EXE vs. DLL

Question:
I have an ActiveX dll into which I can pass an existing ImageList containing a set of images. This works fine and means that I only have to maintain the code / images in one place.However, I have now written an ActiveX exe into which I also wish to pass the ImageList, but this doesn’t work. I get a ‘Type Mismatch’ error.

A similar problem occurs when I try to pass a public class from the dll through to the exe, but this manifests itself with an ‘Automation error (-2147023174)’.

This works fine when the public class is passed through to a dll.

Why does it work with dll’s but not ActiveX exe’s?

Answer:
It would seem to me the reason is that a dll runs in the same process of the client app while an exe runs in a different process space.

devx-admin

Share the Post: