Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamicly linking DLLs 1

Status
Not open for further replies.

garwain

Programmer
Jan 30, 2002
461
CA
I'm looking for resources or just some general feedback about ways to accomplish this.

What I want is to be able to design a program so that it'll be able to accept addon modules, just by dropping a DLL file into the program directory. Is there a way to have the program decide at runtime to load XYZ.dll? For example, I have a program with a listbox showing all DLLs in the directory, knowing that they all have a function called LoadMe(), then by selecting the DLL, and hitting a button, it executes the LoadMe function for that DLL?

Any feedback is appreciated, even it you just tell me I'm crazy (of course I already know that much).

Thanks.
Ben Martin
 
Hi

take a look at this thread:

thread102-515572

But what does the LoadMe() func do? Does it return a value? Or is it a proc?

cheers,
mha
 
sorry about the link..
try again.. :)

link
thread102-515572
 
Thanks. That function looks like exactally what I was looking for.

With the design of my program, LoadMe() would perform all the necessary tasks after the DLL has been loaded. There could be other exported functions, if other modules need to access the DLL for certain reasons, but in my program design, each DLL is supposed to be a pretty much independant module.

Anyway, I look forward to finding to the to try out the code you suggested.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top