View Single Post
  #4   (View Single Post)  
Old 6th November 2008
nfries88's Avatar
nfries88 nfries88 is offline
Port Guard
 
Join Date: Sep 2008
Posts: 24
Default

Quote:
Originally Posted by corey_james View Post
Would this be achieved using 'dlopen' ?
Yes, and on windows it would be achieved with LoadLibrary, GetProcAddress, and FreeLibrary.
(Since it seems you plan to market this application I can only assume Windows is a target for you too)

The basic implementation is:
1) open the library (dlopen/LoadLibrary)
2) get the pointer to the function you want to get from the module, IE "filetype_handler" (dlsym/GetProcAddress)
3) use the function as needed
4) at shutdown or when the module is no longer needed, close the module (dlclose/FreeLibrary).
Reply With Quote