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.

See also  How College Students Can Shape the Future of Tech Responsibility
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist