troubleshooting Question

Dynamically add a VB reference dll?

Avatar of edskee
edskee asked on
Visual Basic Classic
33 Comments1 Solution768 ViewsLast Modified:
Ok, heres the situation.

I'm a good VB programmer, but stuff like networking, DLL's etc I'm pretty new at.

I just figured out how to write a DLL, and how to have my main program use the functions in that DLL.

I made the DLL, compiled it, then in the main program, added a reference to it, and did the code.

I've done this because I have a program I've been working on, and my users have requested the ability to write addon's for it. I thought, hey... if I had a list of DLL's in an Addons directory, if I could scan those as the program starts, link them into the main program, then call them as necessary, that'd be awesome.

So, now that I know HOW to do DLL's... HOW do I dynamically load them? I can do it in C... in my C programs that use shared libs, I code the location of the lib, and the functions in the lib can then be used.

How do you dynamically add a 'reference' while VB is running, so that I can then use the functions in those DLL's?


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 33 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 33 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros