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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question about plugins (.dll)

Status
Not open for further replies.

nimaata

Programmer
Jan 3, 2005
27
US
i want to make a program ive made have the ability to accept plugins (.dll) files, yet im not sure how to start this

any ideas as to how i can begin? im having trouble finding intro for beginners when dealing with plugins (.dll)\

thanks!
 
In a simple manner, you should follow the following steps:

1. Have a place to register existing plugins, like registry sub-tree. Or you might search for plugins in specific directory (like your working directory).
2. Have you program look for the plugins that it might have and load it (LoadLibrary).
3. Have you program call required functions from plugin DLL, like initialization, functionallity, etc. (GetProcAddress)
4. Write a DLL that implements and EXPORTS the functions, that the main program is going to call.
5. Either place that DLL in a working directory, or register it in the registry, depending on the method you chose in in Step1.

This is a framework of app-plugin structure, so feel free to improvise as you move along ;)

------------------
When you do it, do it right.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top